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

Re: workers/40626 (commit 6c476c22) causes multiple test failures



On Feb 28,  7:45am, Daniel Shahaf wrote:
} Subject: Re: workers/40626 (commit 6c476c22) causes multiple test failures
}
} Bart Schaefer wrote on Sun, Feb 26, 2017 at 11:42:16 -0800:
} > I suspect this is what comes of some attempt to optimize assignments.

It occurs to me that $options et al. predate the += syntax, so this may
just have been overlooked when adding array-append.

} For future reference, James (who reported the original bug offlist) has
} since reported another symptom:
} 
} % autoload -Uz compinit; compinit; setopt listambiguous; options+=()

So here's my question ... why would you ever attempt to append to the
options parameter, empty append or otherwise?  The options hash always
contains all possible valid keys; you can't add/delete a key; you can't
duplicate a key; so it absolutely never makes sense to append options.

I was half of a mind to flat out make it an error, as these are ...

torch% options[bogus]=on      
zsh: no such option: bogus
torch% options[shwordsplit]=
zsh: invalid value: 

... until I realized that all the other zsh/parameter hashes had the
same problem and some of them *could* sensibly be appended.



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