mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-15 22:44:01 +00:00
fix 'complete' test
This commit is contained in:
parent
40dcfaa90a
commit
57995abb03
1 changed files with 3 additions and 3 deletions
|
@ -295,13 +295,13 @@ if begin
|
||||||
# set dir (realpath --relative-to="$PWD" (mktemp -d XXXXXXXX))
|
# set dir (realpath --relative-to="$PWD" (mktemp -d XXXXXXXX))
|
||||||
set dir (basename (mktemp -d XXXXXXXX))
|
set dir (basename (mktemp -d XXXXXXXX))
|
||||||
mkdir -p $dir
|
mkdir -p $dir
|
||||||
if complete -C$dir | grep "^$dir/.*Directory" >/dev/null
|
if complete -C$dir | string match -r "^$dir/.*dir" >/dev/null
|
||||||
echo "implicit cd complete works"
|
echo "implicit cd complete works"
|
||||||
else
|
else
|
||||||
echo "no implicit cd complete"
|
echo "no implicit cd complete"
|
||||||
end
|
end
|
||||||
#CHECK: implicit cd complete works
|
#CHECK: implicit cd complete works
|
||||||
if complete -C"command $dir" | grep "^$dir/.*Directory" >/dev/null
|
if complete -C"command $dir" | string match -r "^$dir/.*dir" >/dev/null
|
||||||
echo "implicit cd complete after 'command'"
|
echo "implicit cd complete after 'command'"
|
||||||
else
|
else
|
||||||
echo "no implicit cd complete after 'command'"
|
echo "no implicit cd complete after 'command'"
|
||||||
|
@ -310,7 +310,7 @@ if begin
|
||||||
popd
|
popd
|
||||||
if begin
|
if begin
|
||||||
set -l PATH $PWD/test6.tmp.dir $PATH 2>/dev/null
|
set -l PATH $PWD/test6.tmp.dir $PATH 2>/dev/null
|
||||||
complete -C$dir | grep "^$dir/.*Directory" >/dev/null
|
complete -C$dir | string match -r "^$dir/.*dir" >/dev/null
|
||||||
end
|
end
|
||||||
echo "incorrect implicit cd from PATH"
|
echo "incorrect implicit cd from PATH"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue