cd: Fix test for too many args

This commit is contained in:
jalr 2019-10-08 21:24:24 +02:00 committed by Fabian Homborg
parent 055a332133
commit 2e6ab0b418

View file

@ -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