浏览代码

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

Fixes #12023
Marc Cornellà 6 月之前
父节点
当前提交
b6bb133f23
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      plugins/git/git.plugin.zsh

+ 2 - 0
plugins/git/git.plugin.zsh

@@ -166,6 +166,8 @@ alias gclean='git clean --interactive -d'
 alias gcl='git clone --recurse-submodules'
 
 function gccd() {
+  setopt localoptions extendedglob
+
   # 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/#)#]}:-$_}"