diff --git a/.config/fish/conf.d/smart_cd.fish b/.config/fish/conf.d/smart_cd.fish deleted file mode 100644 index 99a5d93f..00000000 --- a/.config/fish/conf.d/smart_cd.fish +++ /dev/null @@ -1,22 +0,0 @@ -if not functions -q __cd_orig - functions --copy cd __cd_orig -end - -function cd --wraps=cd --description "Change directory. No args goes to git root or $HOME. If already there, return to previous location." - git rev-parse --is-inside-work-tree &>/dev/null - set -l is_git $status - if test (count $argv) -ne 0 - __cd_orig $argv - else - if test $is_git -eq 0 - set root (git rev-parse --show-toplevel) - else - set root ~ - end - if not test (pwd) = $root - __cd_orig $root - else - __cd_orig - - end - end -end