zsh-workers
 help / color / mirror / code / Atom feed
* [Bug] VCS_Info: nvcsformats ineffective on zsh 5.2
@ 2015-12-08 12:29 Andreas Wiese
  2015-12-08 12:57 ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Wiese @ 2015-12-08 12:29 UTC (permalink / raw)
  To: zsh-workers

Hello.

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.

Kind regards, Andreas
-- 
He had heard people speak contemptuously of money: he
wondered if they had ever tried to do without it.
  — W. Somerset Maugham


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Bug] VCS_Info: nvcsformats ineffective on zsh 5.2
  2015-12-08 12:29 [Bug] VCS_Info: nvcsformats ineffective on zsh 5.2 Andreas Wiese
@ 2015-12-08 12:57 ` Peter Stephenson
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2015-12-08 12:57 UTC (permalink / raw)
  To: zsh-workers

On Tue, 8 Dec 2015 13:29:04 +0100
Andreas Wiese <aw-zsh@instandbesetzt.net> 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
     c='default'


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-08 12:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-08 12:29 [Bug] VCS_Info: nvcsformats ineffective on zsh 5.2 Andreas Wiese
2015-12-08 12:57 ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).