mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-19 16:52:46 +08:00
cd: Fix test for too many args
This commit is contained in:
parent
055a332133
commit
2e6ab0b418
|
@ -4,7 +4,7 @@
|
|||
function cd --description "Change directory"
|
||||
set -l MAX_DIR_HIST 25
|
||||
|
||||
if test (count $argv) -gt 1
|
||||
if test (count $argv) -gt (test "$argv[1]" = "--" && echo 2 || echo 1)
|
||||
printf "%s\n" (_ "Too many args for cd command")
|
||||
return 1
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user