From d50da86a4336fae9ec91f62b2d312336274a0df2 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sun, 8 Oct 2023 19:48:57 +0200 Subject: [PATCH] Handle weird args --- .config/fish/functions/makeaway.fish | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.config/fish/functions/makeaway.fish b/.config/fish/functions/makeaway.fish index 3f607cb..8b9502f 100644 --- a/.config/fish/functions/makeaway.fish +++ b/.config/fish/functions/makeaway.fish @@ -24,6 +24,10 @@ function makeaway # User used "--" without target echo "No target found." 1>&2 return 1 + else if test (count $argv) -ge 2 && not test "$argv[2]" = -- + # User used "--" without target + echo "Unknown argument `$argv[2]`." 1>&2 + return 1 end # Make