mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 23:24:39 +00:00
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
This commit is contained in:
parent
907b2f8462
commit
6e0e7e0996
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue