mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
cd: Fix test for too many args
This commit is contained in:
parent
055a332133
commit
2e6ab0b418
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue