From 9506dfc7c56f22296e69d750b1262a2c82bcf252 Mon Sep 17 00:00:00 2001 From: Anton Bobov Date: Sun, 12 Jan 2025 17:09:50 +0500 Subject: zsh: Fix git clone function Fix cloning repository with '.git' in middle of the repository name. --- files/.zsh/rc/S50_functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'files/.zsh/rc') diff --git a/files/.zsh/rc/S50_functions b/files/.zsh/rc/S50_functions index 86cb63c..b446f16 100644 --- a/files/.zsh/rc/S50_functions +++ b/files/.zsh/rc/S50_functions @@ -4,7 +4,7 @@ mcd() { compdef _directories mcd gclone() { - git clone --recursive "$1" && cd "$(basename "$1" | sed -e 's/\.git//')" + git clone --recursive "$1" && cd "$(basename "$1" | sed -e 's/\.git$//')" } wcc() { -- cgit v1.2.3