From c8f53dfe2e7c78f18927837757a5a8b972a3f4fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Thu, 10 Aug 2023 18:40:07 +0200 Subject: [PATCH] feat: better zoxide alias and completions --- modules/profiles/base.nix | 9 +++++++-- modules/programs/fish.nix | 3 +++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/profiles/base.nix b/modules/profiles/base.nix index 9727af2..d6d6523 100644 --- a/modules/profiles/base.nix +++ b/modules/profiles/base.nix @@ -55,7 +55,7 @@ in cat = "bat"; rm = "rm -i"; mv = "mv -i"; - cd = "z"; + cd = "__zoxide_z"; nixos-switch = nom-system-command "sudo nixos-rebuild switch --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" ]; }; - zoxide.enable = true; + zoxide = { + enable = true; + options = [ + "--cmd c" + ]; + }; }; home = { username = "moritz"; diff --git a/modules/programs/fish.nix b/modules/programs/fish.nix index 549a363..aac66b3 100644 --- a/modules/programs/fish.nix +++ b/modules/programs/fish.nix @@ -43,6 +43,9 @@ in # visual mode, but due to fish_cursor_default, is redundant here set fish_cursor_visual block + # Completions + complete -c c -kfa '(zoxide query -l | sed "s|$HOME|~|")' + # Variables ${exportedVariables} '';