fish: use setCursor for all abbrs
Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
parent
6ab6fb3eb5
commit
5ae4cbd0b2
1 changed files with 209 additions and 207 deletions
|
@ -19,37 +19,36 @@ in {
|
|||
inherit enable interactiveShellInit shellAbbrs;
|
||||
};
|
||||
|
||||
${config.custom.username}.programs.fish = let
|
||||
# Expand abbreviations anywhere in the shell
|
||||
#?? sudo ABBREVIATION
|
||||
anywhere = expansion: {
|
||||
inherit expansion;
|
||||
position = "anywhere";
|
||||
setCursor = true;
|
||||
};
|
||||
|
||||
# Set cursor position to %
|
||||
#?? % | EXPANSION
|
||||
cursor = expansion: {
|
||||
inherit expansion;
|
||||
setCursor = true;
|
||||
};
|
||||
in {
|
||||
${config.custom.username}.programs.fish = {
|
||||
enable = true;
|
||||
|
||||
shellAbbrs = {
|
||||
"/e" = anywhere "/etc/%";
|
||||
"/en" = anywhere "/etc/nixos/%";
|
||||
"/h" = anywhere "~/%";
|
||||
"/hd" = anywhere "~/.dev/%";
|
||||
"/n" = anywhere "/nix/%";
|
||||
"/nv" = anywhere "/nix/var/%";
|
||||
"/nvn" = anywhere "/nix/var/nix/%";
|
||||
"/nvnp" = anywhere "/nix/var/nix/profiles/%";
|
||||
"/nvnps" = anywhere "/nix/var/nix/profiles/system/%";
|
||||
"/r" = anywhere "/run/%";
|
||||
"/rc" = anywhere "/run/current-system/%";
|
||||
|
||||
shellAbbrs =
|
||||
# Expand abbreviations anywhere in the shell
|
||||
#?? sudo ABBREVIATION
|
||||
mapAttrs (name: value: {
|
||||
expansion = value;
|
||||
position = "anywhere";
|
||||
setCursor = true;
|
||||
}) {
|
||||
"/e" = "/etc/%";
|
||||
"/en" = "/etc/nixos/%";
|
||||
"/h" = "~/%";
|
||||
"/hd" = "~/.dev/%";
|
||||
"/n" = "/nix/%";
|
||||
"/nv" = "/nix/var/%";
|
||||
"/nvn" = "/nix/var/nix/%";
|
||||
"/nvnp" = "/nix/var/nix/profiles/%";
|
||||
"/nvnps" = "/nix/var/nix/profiles/system/%";
|
||||
"/r" = "/run/%";
|
||||
"/rc" = "/run/current-system/%";
|
||||
}
|
||||
//
|
||||
# Set all cursor positions to %
|
||||
#?? % | EXPANSION
|
||||
mapAttrs (name: value: {
|
||||
expansion = value;
|
||||
setCursor = true;
|
||||
}) {
|
||||
reboot = "sudo systemctl reboot";
|
||||
restart = "sudo systemctl reboot";
|
||||
poweroff = "sudo systemctl poweroff";
|
||||
|
@ -163,9 +162,12 @@ in {
|
|||
nfi = "nix flake info";
|
||||
nfl = "nix flake lock";
|
||||
nfu = "nix flake update";
|
||||
ngl = cursor "nix run github:nix-community/nixGL --impure -- %";
|
||||
nr = "nix run nixpkgs#";
|
||||
ns = "nix shell nixpkgs#";
|
||||
nr = "nix run";
|
||||
nrgl = "nix run github:nix-community/nixGL --impure -- %";
|
||||
nrn = "nix run nixpkgs#%";
|
||||
ns = "nix shell";
|
||||
nsgl = "nix shell github:nix-community/nixGL --impure";
|
||||
nsn = "nix shell nixpkgs#%";
|
||||
nt = "nix store";
|
||||
|
||||
no = "nixos";
|
||||
|
|
Loading…
Add table
Reference in a new issue