mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-20 23:04:12 +08:00
cd: Add test for changing to a dir starting with a -
char
This commit is contained in:
parent
2e6ab0b418
commit
3d1e9423c2
@ -76,6 +76,12 @@ set -g CDPATH ./
|
||||
cd $base
|
||||
test $PWD = $base; and echo No crash with ./ CDPATH
|
||||
|
||||
# test for directories beginning with a hyphen
|
||||
mkdir $base/-testdir
|
||||
cd $base
|
||||
cd -- -testdir
|
||||
test $PWD = $base/-testdir
|
||||
|
||||
# cd back before removing the test directory again.
|
||||
cd $oldpwd
|
||||
rm -Rf $base
|
||||
|
Loading…
x
Reference in New Issue
Block a user