Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [Bug] VCS_Info: nvcsformats ineffective on zsh 5.2

On Tue, 8 Dec 2015 13:29:04 +0100
Andreas Wiese <aw-zsh@xxxxxxxxxxxxxxxxxx> wrote:
> In zsh 5.2, VCS_info's `nvcsformats' is broken, resp. disfunctional.
> It will always evaluate to ''.  Removing the line
>   local -a msgs
> from Functions/VCS_Info/VCS_INFO_nvcsformats introduced in commit
> ae4cf7b7 leads to the wanted behaviour.  I did not fully understand the
> sense between the introduced line and the cause for the misbehaviour,
> though.

Hmmm...  Mikael added a "local -a msgs" to the level above that should
have made the warning from this variable to go away.  But obviously
it needs not to be local here, wherever the warning came from.

It's possible whoever reported the fact that it didn't was using an
older version of the scripts, I suppose.

diff --git a/Functions/VCS_Info/VCS_INFO_nvcsformats b/Functions/VCS_Info/VCS_INFO_nvcsformats
index 203a86d..581aa5a 100644
--- a/Functions/VCS_Info/VCS_INFO_nvcsformats
+++ b/Functions/VCS_Info/VCS_INFO_nvcsformats
@@ -4,7 +4,6 @@
 setopt localoptions noksharrays NO_shwordsplit
 local c v rr
-local -a msgs
 if [[ $1 == '-preinit-' ]] ; then

Messages sorted by: Reverse Date, Date, Thread, Author