0
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-09-19 04:01:21 +02:00

fix(git): fix repository detection in gccd function (#12023)

Fixes #12023
This commit is contained in:
Marc Cornellà 2023-11-08 08:42:34 +01:00
parent 632ed413a9
commit b6bb133f23
No known key found for this signature in database
GPG key ID: 0314585E776A9C1B

View file

@ -166,6 +166,8 @@ alias gclean='git clean --interactive -d'
alias gcl='git clone --recurse-submodules' alias gcl='git clone --recurse-submodules'
function gccd() { function gccd() {
setopt localoptions extendedglob
# get repo URI from args based on valid formats: https://git-scm.com/docs/git-clone#URLS # get repo URI from args based on valid formats: https://git-scm.com/docs/git-clone#URLS
local repo="${${@[(r)(ssh://*|git://*|ftp(s)#://*|http(s)#://*|*@*)(.git/#)#]}:-$_}" local repo="${${@[(r)(ssh://*|git://*|ftp(s)#://*|http(s)#://*|*@*)(.git/#)#]}:-$_}"