mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-25 23:21:15 -03:00
cd: Fix test for too many args
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user