Thread (1 message) 1 message, 1 author, 2018-06-11

Re: [PATCH] Use ZSH_NAME instead of ZSH_VERSION because it's redefined by git-completion.zsh

flat view

From: Junio C Hamano <hidden>
Date: 2018-06-11 17:04:57

Junio C Hamano [off-list ref] writes:
Rick van Hattem [off-list ref] writes:
quoted
The `git-completion.zsh` unsets the `$ZSH_VERSION` which makes this check moot. The result (at least for me) is that zsh segfaults because of all the variables it's unsetting.
---
Overlong line, lack of sign-off.
quoted
 # Clear the variables caching builtins' options when (re-)sourcing
 # the completion script.
-if [[ -n ${ZSH_VERSION-} ]]; then
+if [[ -n ${ZSH_NAME-} ]]; then
      ...
        ZSH_VERSION='' . "$script"
	...

If your ZSH_VERSION is empty, doesn't it indicate that the script
did not find a usable git-completion.bash script (to which it
outsources the bulk of the completion work)?
Ah, I was totally mis-reading the script (and partly was confused by
your use of "unset").  ZSH_VERSION is reset to an empty string,
which breaks the check later done in the bash completion script.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help