From: Nicolas Boisselier Date: Mon, 15 Jan 2018 16:44:06 +0000 (+0000) Subject: etc/profile.d/git.sh X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=d2dbca1a4e63836906243b59b3800ca4b9368227;p=nb.git etc/profile.d/git.sh --- diff --git a/etc/profile.d/git.sh b/etc/profile.d/git.sh index dbfecfd2..292be9d7 100644 --- a/etc/profile.d/git.sh +++ b/etc/profile.d/git.sh @@ -199,7 +199,7 @@ git_branch_create_push() { } git_name() { - git config --local remote.origin.url | sed -E 's,^.*[:/]([^:/\.]+)(\.git)?$,\1,' + git config --local remote.origin.url | sed -E -e 's,^[^:/]+[:/],,' -e 's/\.git$//' } git_branch() {