b6bb133f230847ed0b3f9f4e25f2ceb874ca6c91
- Author
- Marc Cornellà <marc@mcornella.com>
- Committer
- Marc Cornellà <marc@mcornella.com>
- Date
Message
fix(git): fix repository detection in `gccd` function (#12023)
Fixes #12023
Diff
1diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh
2index 6ea1d1177c660f19aae6e282c28d0e6325ad360c..2a824444b056d492919be10d88467cdc96d7e9e1 100644
3--- a/plugins/git/git.plugin.zsh
4+++ b/plugins/git/git.plugin.zsh
5@@ -166,6 +166,8 @@ alias gclean='git clean --interactive -d'
6 alias gcl='git clone --recurse-submodules'
7
8 function gccd() {
9+ setopt localoptions extendedglob
10+
11 # get repo URI from args based on valid formats: https://git-scm.com/docs/git-clone#URLS
12 local repo="${${@[(r)(ssh://*|git://*|ftp(s)#://*|http(s)#://*|*@*)(.git/#)#]}:-$_}"
13