mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-01 13:01:21 -03:00
Always use "." for cd
Nobody doesn't want to use $PWD to cd, so if $CDPATH does not include it that was a mistake. Bash also appends "." here. Fixes #4484.
This commit is contained in:
10
tests/cd.in
10
tests/cd.in
@@ -62,6 +62,16 @@ test (realpath $output_pwd) = $real_getcwd
|
||||
and echo "BogusPWD test 2 succeeded"
|
||||
or echo "BogusPWD test 2 failed: $output_pwd vs $real_getcwd"
|
||||
|
||||
# $CDPATH
|
||||
logmsg CDPATH
|
||||
set -g CDPATH $base
|
||||
cd linkhome
|
||||
test $PWD = $base/linkhome; and echo Gone to linkhome via CDPATH
|
||||
set -g CDPATH /tmp
|
||||
cd $base
|
||||
test $PWD = $base; and echo Gone to base
|
||||
cd linkhome
|
||||
test $PWD = $base/linkhome; and echo Gone to linkhome via implicit . in CDPATH
|
||||
|
||||
# cd back before removing the test directory again.
|
||||
cd $oldpwd
|
||||
|
||||
Reference in New Issue
Block a user