diff options
author | axel <axel@liljencrantz.se> | 2006-06-17 01:18:48 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2006-06-17 01:18:48 +1000 |
commit | 6e0e7e099601a436db4e83daff038873cbf5d00d (patch) | |
tree | 5c1838ae65365facc2cdce99e0d8dd40b1f1b3f3 /share/functions/cd.fish | |
parent | 907b2f84623e285f9b800145f46448cc475abed8 (diff) |
Fix a bug in the function wrapper around the 'cd' builtin that caused cd to sometimes return with a non-zero exit status even though the command did not fail
darcs-hash:20060616151848-ac50b-001698980eca6fadf9e470d829a532c305c84e38.gz
Diffstat (limited to 'share/functions/cd.fish')
-rw-r--r-- | share/functions/cd.fish | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/share/functions/cd.fish b/share/functions/cd.fish index a08f9e99..40e00097 100644 --- a/share/functions/cd.fish +++ b/share/functions/cd.fish @@ -23,13 +23,14 @@ function cd -d (N_ "Change directory") end builtin cd $argv[1] + set -l cd_status $status - if test $status = 0 -a $PWD != $previous + if test $cd_status = 0 -a $PWD != $previous set -g dirprev $dirprev $previous set -e dirnext set -g __fish_cd_direction prev end - return $status + return $cd_status end |