From 1d378225a5b7cf1a68a5ea2883e25b0fef78d3ad Mon Sep 17 00:00:00 2001 From: MorganGeek Date: Tue, 30 Jun 2020 11:09:26 +0200 Subject: [PATCH] fix clone function behavior with public urls --- dot_zsh_functions | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dot_zsh_functions b/dot_zsh_functions index c87b25c..6ccd05a 100644 --- a/dot_zsh_functions +++ b/dot_zsh_functions @@ -304,7 +304,8 @@ function gitpushallremote { done } function clone { - local folder=$(echo $1 | cut -d'/' -f2 | cut -d'.' -f1) + local folder=$(echo $1 | \grep -Eo '[a-zA-Z_-]+.git$' | cut -d'.' -f1) + echo "$folder" gcls "$1" cd "$folder" copyhooks