From: Nicolas Boisselier Date: Wed, 16 Oct 2024 14:16:59 +0000 (+0200) Subject: etc/profile.d/git.sh X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=e8ae28ab0479a81c0d25b3d07cbd37c3d1e01104;p=nb.git etc/profile.d/git.sh --- diff --git a/etc/profile.d/git.sh b/etc/profile.d/git.sh index bede08e5..3cc94e2a 100644 --- a/etc/profile.d/git.sh +++ b/etc/profile.d/git.sh @@ -274,7 +274,7 @@ git_branch_create_push() { git_name() { # NB 01.05.18 git config --local remote.origin.url | sed -E -e 's,^[^:/]+[:/],,' -e 's,/.*$,,' -e 's/\.git$//' # NB 16.10.24 git config --local remote.origin.url | sed -E -e 's,^[^:/]+[:/],,' -e 's,(/|\.git)$,,' -e 's,^.*/,,' - basename "$(git config --local remote.origin.url)" .git + basename "$(git config --local remote.origin.url | tr : /)" .git } git_branch() {