diff --git a/share/functions/__fish_move_last.fish b/share/functions/__fish_move_last.fish index 751b3d2a0..0e71046c1 100644 --- a/share/functions/__fish_move_last.fish +++ b/share/functions/__fish_move_last.fish @@ -12,7 +12,7 @@ function __fish_move_last -d "Move the last element of a directory history from end # Append current dir to the end of the destination - set -g (echo $dest) $$dest (command pwd) + set -g (echo $dest) $$dest $PWD set ssrc $$src diff --git a/tests/cd.in b/tests/cd.in index 6ea2c0289..1e84835fc 100644 --- a/tests/cd.in +++ b/tests/cd.in @@ -9,6 +9,8 @@ set real (mktemp -d) set link $base/link ln -s $real $link cd $link +prevd +nextd test "$PWD" = "$link" || echo "\$PWD != \$link:"\n "\$PWD: $PWD"\n "\$link: $link"\n test (pwd) = "$link" || echo "(pwd) != \$link:"\n "\$PWD: "(pwd)\n "\$link: $link"\n test (pwd -P) = "$real" || echo "(pwd -P) != \$real:"\n "\$PWD: $PWD"\n "\$real: $real"\n