mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Avoid using the pwd command in favour of the $PWD variable, since the pwd command does not seem to work well with fuse
darcs-hash:20060529130753-ac50b-0d32fe0924dbf9e83520d26402e9daae77789419.gz
This commit is contained in:
parent
d46dade284
commit
433169dca4
2 changed files with 3 additions and 3 deletions
|
@ -11,7 +11,7 @@ function cd -d (N_ "Change directory")
|
||||||
end
|
end
|
||||||
|
|
||||||
# Avoid set completions
|
# Avoid set completions
|
||||||
set previous (command pwd)
|
set previous $PWD
|
||||||
|
|
||||||
if test $argv[1] = - ^/dev/null
|
if test $argv[1] = - ^/dev/null
|
||||||
if test $__fish_cd_direction = next ^/dev/null
|
if test $__fish_cd_direction = next ^/dev/null
|
||||||
|
@ -24,7 +24,7 @@ function cd -d (N_ "Change directory")
|
||||||
|
|
||||||
builtin cd $argv[1]
|
builtin cd $argv[1]
|
||||||
|
|
||||||
if test $status = 0 -a (command pwd) != $previous
|
if test $status = 0 -a $PWD != $previous
|
||||||
set -g dirprev $dirprev $previous
|
set -g dirprev $dirprev $previous
|
||||||
set -e dirnext
|
set -e dirnext
|
||||||
set -g __fish_cd_direction prev
|
set -g __fish_cd_direction prev
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
function pwd -d (N_ "Print working directory")
|
function pwd -d (N_ "Print working directory")
|
||||||
command pwd | sed -e 's|/private||' -e "s|^$HOME|~|"
|
echo $PWD | sed -e 's|/private||' -e "s|^$HOME|~|"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue