From a14255ee10f02400de38e83b58c14b9d49923929 Mon Sep 17 00:00:00 2001 From: zebra Date: Wed, 24 Jul 2024 16:31:36 -0700 Subject: [PATCH] added !! and multicd --- config-files/config.fish | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/config-files/config.fish b/config-files/config.fish index 5368cb7..0f445ba 100644 --- a/config-files/config.fish +++ b/config-files/config.fish @@ -4,6 +4,19 @@ end set -U fish_greeting "" +#cd tweaks - multicd +function multicd + echo cd (string repeat -n (math (string length -- $argv[1]) - 1) ../) +end +abbr --add dotdot --regex '^\.\.+$' --function multicd + +#double bang !! + +function last_history_item + echo $history[1] +end +abbr -a !! --position anywhere --function last_history_item + # pyenv init if command -v pyenv 1>/dev/null 2>&1