浏览代码

gitfast: downgrade to upstream v2.16 (#7918)

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Felipe Contreras 5 年之前
父节点
当前提交
d69bad8eb4
共有 3 个文件被更改,包括 756 次插入500 次删除
  1. 2 11
      plugins/gitfast/_git
  2. 753 488
      plugins/gitfast/git-completion.bash
  3. 1 1
      plugins/gitfast/update

+ 2 - 11
plugins/gitfast/_git

@@ -39,7 +39,7 @@ if [ -z "$script" ]; then
 		test -f $e && script="$e" && break
 	done
 fi
-GIT_SOURCING_ZSH_COMPLETION=y . "$script"
+ZSH_VERSION='' . "$script"
 
 __gitcomp ()
 {
@@ -93,22 +93,13 @@ __gitcomp_nl_append ()
 	compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0
 }
 
-__gitcomp_file_direct ()
-{
-	emulate -L zsh
-
-	local IFS=$'\n'
-	compset -P '*[=:]'
-	compadd -f -- ${=1} && _ret=0
-}
-
 __gitcomp_file ()
 {
 	emulate -L zsh
 
 	local IFS=$'\n'
 	compset -P '*[=:]'
-	compadd -p "${2-}" -f -- ${=1} && _ret=0
+	compadd -Q -p "${2-}" -f -- ${=1} && _ret=0
 }
 
 __git_zsh_bash_func ()

文件差异内容过多而无法显示
+ 753 - 488
plugins/gitfast/git-completion.bash


+ 1 - 1
plugins/gitfast/update

@@ -1,7 +1,7 @@
 #!/bin/sh
 
 url="https://git.kernel.org/pub/scm/git/git.git/plain/contrib/completion"
-version="2.21.0"
+version="2.16.0"
 
 curl -s -o _git "${url}/git-completion.zsh?h=v${version}" &&
 curl -s -o git-completion.bash "${url}/git-completion.bash?h=v${version}" &&