summaryrefslogtreecommitdiff
path: root/plugins/gitfast/_git
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2019-06-07 10:57:47 -0500
committerMarc Cornellà <marc.cornella@live.com>2019-06-07 17:57:46 +0200
commiteb3d46308157e10eb11ec96bcf14b319279d09d3 (patch)
treebcf6b19a02325cba7c60e06c9c516b1473774fd9 /plugins/gitfast/_git
parent52fdae4b3d17f7ab602124ec8792865b5fc03236 (diff)
downloadzsh-eb3d46308157e10eb11ec96bcf14b319279d09d3.tar.gz
zsh-eb3d46308157e10eb11ec96bcf14b319279d09d3.tar.bz2
zsh-eb3d46308157e10eb11ec96bcf14b319279d09d3.zip
gitfast: update to upstream v2.21 (#7914)
* gitfast: use $OSTYPE again In the last update to upstream this was reverted: a56eac7a (Use OSTYPE instead of uname whenever possible for better speed. (#5496)) Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> * gitfast: simplify plugin No need to set and unset a variable we use once. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> * gitfast: add script to update from upstream This would make easier the process of updating, and also not miss our patches. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> * gitfast: update to upstream v2.21 Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Diffstat (limited to 'plugins/gitfast/_git')
-rw-r--r--plugins/gitfast/_git13
1 files changed, 11 insertions, 2 deletions
diff --git a/plugins/gitfast/_git b/plugins/gitfast/_git
index 78a6dbb3d..c003a6771 100644
--- a/plugins/gitfast/_git
+++ b/plugins/gitfast/_git
@@ -39,7 +39,7 @@ if [ -z "$script" ]; then
test -f $e && script="$e" && break
done
fi
-ZSH_VERSION='' . "$script"
+GIT_SOURCING_ZSH_COMPLETION=y . "$script"
__gitcomp ()
{
@@ -93,13 +93,22 @@ __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 -Q -p "${2-}" -f -- ${=1} && _ret=0
+ compadd -p "${2-}" -f -- ${=1} && _ret=0
}
__git_zsh_bash_func ()