From f3114bcaede1bc80ed3f3194b3de9e3e7af0e5fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chlo=C3=A9=20Vulquin?= Date: Sun, 21 Apr 2024 10:50:37 +0200 Subject: sh/zoxide: also alias cd To my knowledge there's no advantage to the builtin over `z`. Maybe syntax highlighting? Anyway I forget to type `z` pretty often, so just alias cd. --- dot_local/share/sh/zoxide | 1 + dot_local/share/sh/zoxide.bash | 1 + dot_local/share/sh/zoxide.fish | 3 +++ 3 files changed, 5 insertions(+) diff --git a/dot_local/share/sh/zoxide b/dot_local/share/sh/zoxide index 210db16..a89202c 100644 --- a/dot_local/share/sh/zoxide +++ b/dot_local/share/sh/zoxide @@ -1,2 +1,3 @@ . hascmd zoxide || return eval "$(zoxide init posix --hook prompt)" +alias cd=z diff --git a/dot_local/share/sh/zoxide.bash b/dot_local/share/sh/zoxide.bash index 6a02524..b3ab493 100644 --- a/dot_local/share/sh/zoxide.bash +++ b/dot_local/share/sh/zoxide.bash @@ -1,2 +1,3 @@ . hascmd zoxide || return eval "$(zoxide init bash)" +alias cd=z diff --git a/dot_local/share/sh/zoxide.fish b/dot_local/share/sh/zoxide.fish index b62450c..6c97910 100644 --- a/dot_local/share/sh/zoxide.fish +++ b/dot_local/share/sh/zoxide.fish @@ -1,2 +1,5 @@ . hascmd zoxide || return zoxide init fish | source +function cd --wraps=z --description 'alias cd=z' + z $argv +end -- cgit v1.2.3