File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ function _direnv
2+ if test $argv [1] = 0 -a -n " $_ _fish_direnv"
3+ set -l direnv (eval $_ _fish_direnv export fish)
4+ eval $direnv
5+ end
6+ end
17#
28# The following functions add support for a directory history
39#
@@ -7,12 +13,8 @@ function cd --description "Change directory"
713 # Skip history in subshells
814 if status --is-command-substitution
915 builtin cd $argv
10- set -l cd_status $status
11- if test $cd_status = 0 -a -n " $_ _fish_direnv"
12- set -l direnv (eval $_ _fish_direnv export fish)
13- eval $direnv
14- end
15-
16+ set -l cd_status $status
17+ _direnv $status
1618 return $cd_status
1719 end
1820
@@ -26,10 +28,7 @@ function cd --description "Change directory"
2628 prevd
2729 end
2830 set -l cd_status $status
29- if test $cd_status = 0 -a -n " $_ _fish_direnv"
30- set -l direnv (eval $_ _fish_direnv export fish)
31- eval $direnv
32- end
31+ _direnv $cd_status
3332 return $cd_status
3433 end
3534
@@ -42,10 +41,7 @@ function cd --description "Change directory"
4241 set -g __fish_cd_direction prev
4342 end
4443
45- if test $cd_status = 0 -a -n " $_ _fish_direnv"
46- set -l direnv (eval $_ _fish_direnv export fish)
47- eval $direnv
48- end
44+ _direnv $cd_status
4945
5046 return $cd_status
5147end
You can’t perform that action at this time.
0 commit comments