Skip to content
Snippets Groups Projects
Commit 4d605b0f authored by Junio C Hamano's avatar Junio C Hamano
Browse files

Merge branch 'sg/completion-zsh-workaround'

Work around zsh segfaulting when loading git-completion.zsh

* sg/completion-zsh-workaround:
  completion: correct zsh detection when run from git-completion.zsh
parents 8d0d53a8 61d48c66
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -3223,7 +3223,10 @@ __gitk_main ()
__git_complete_revlist
}
 
if [[ -n ${ZSH_VERSION-} ]]; then
if [[ -n ${ZSH_VERSION-} ]] &&
# Don't define these functions when sourced from 'git-completion.zsh',
# it has its own implementations.
[[ -z ${GIT_SOURCING_ZSH_COMPLETION-} ]]; then
echo "WARNING: this script is deprecated, please see git-completion.zsh" 1>&2
 
autoload -U +X compinit && compinit
Loading
Loading
Loading
Loading
@@ -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 ()
{
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment