feat: better zoxide alias and completions

nixos
Moritz Böhme 2023-08-10 18:40:07 +02:00
parent 4cd51917fc
commit c8f53dfe2e
Signed by: moritz
GPG Key ID: 970C6E89EB0547A9
2 changed files with 10 additions and 2 deletions

View File

@ -55,7 +55,7 @@ in
cat = "bat"; cat = "bat";
rm = "rm -i"; rm = "rm -i";
mv = "mv -i"; mv = "mv -i";
cd = "z"; cd = "__zoxide_z";
nixos-switch = nom-system-command "sudo nixos-rebuild switch --flake ~/.dotfiles"; nixos-switch = nom-system-command "sudo nixos-rebuild switch --flake ~/.dotfiles";
nixos-boot = nom-system-command "sudo nixos-rebuild boot --flake ~/.dotfiles"; nixos-boot = nom-system-command "sudo nixos-rebuild boot --flake ~/.dotfiles";
@ -167,7 +167,12 @@ in
"--bind alt-j:preview-down,alt-k:preview-up" "--bind alt-j:preview-down,alt-k:preview-up"
]; ];
}; };
zoxide.enable = true; zoxide = {
enable = true;
options = [
"--cmd c"
];
};
}; };
home = { home = {
username = "moritz"; username = "moritz";

View File

@ -43,6 +43,9 @@ in
# visual mode, but due to fish_cursor_default, is redundant here # visual mode, but due to fish_cursor_default, is redundant here
set fish_cursor_visual block set fish_cursor_visual block
# Completions
complete -c c -kfa '(zoxide query -l | sed "s|$HOME|~|")'
# Variables # Variables
${exportedVariables} ${exportedVariables}
''; '';