From 2e6ab0b418f2fb17fcbf18ef5b118bc342a1118a Mon Sep 17 00:00:00 2001 From: jalr Date: Tue, 8 Oct 2019 21:24:24 +0200 Subject: [PATCH] cd: Fix test for too many args --- share/functions/cd.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/functions/cd.fish b/share/functions/cd.fish index e04b227a0..df7b0c8c9 100644 --- a/share/functions/cd.fish +++ b/share/functions/cd.fish @@ -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