diff options
author | 2009-02-02 08:20:58 +1000 | |
---|---|---|
committer | 2009-02-02 08:20:58 +1000 | |
commit | 112346799162ae2b06b724abc12e983557899dea (patch) | |
tree | c843cc0b6bcd29ce18cf38dd150c01d88f774689 /share/functions | |
parent | 4f54da3795e90128b1efa0b4a956f2e3878b8d9e (diff) |
Fix cd function to handle empty variables correctly. Patch by Sven Axelsson.
darcs-hash:20090201222058-ac50b-31a7ee2db9f68729c21ba153e1439cbeabff84ce.gz
Diffstat (limited to 'share/functions')
-rw-r--r-- | share/functions/cd.fish | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/share/functions/cd.fish b/share/functions/cd.fish index 7e97be01..64ac705d 100644 --- a/share/functions/cd.fish +++ b/share/functions/cd.fish @@ -14,7 +14,7 @@ function cd --description "Change directory" set -l previous $PWD if test $argv[1] = - ^/dev/null - if test $__fish_cd_direction = next ^/dev/null + if test "$__fish_cd_direction" = next ^/dev/null nextd else prevd @@ -25,7 +25,7 @@ function cd --description "Change directory" builtin cd $argv[1] set -l cd_status $status - if test $cd_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 |