From 6cc1560a0719120469a3301ac3517b13704c3681 Mon Sep 17 00:00:00 2001 From: Charles Gould Date: Wed, 29 Mar 2023 10:40:36 -0400 Subject: [PATCH] fish: validate clone inputs --- fish/functions/clone.fish | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fish/functions/clone.fish b/fish/functions/clone.fish index 052292f..5aadefd 100644 --- a/fish/functions/clone.fish +++ b/fish/functions/clone.fish @@ -1,4 +1,9 @@ function clone --argument-names giturl + if test (count $argv) -gt 1 + echo "Expected a Git URL but got "(count $argv)" arguments: '$argv'" + return 1 + end + # These regular expressions are far from comprehensive, but they work for me. # # Examples: