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

Re: Zsh's and ksh's bang (!) expansion flags have different meanings



On Sun, Jul 19, 2026 at 6:36 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
You're not noticing anything new, or rather the only thing new that you're noticing is that the (!) flag exists at all.  Zsh never had (!) until I started working on named references, because using ! for anything other than history was a problem in interactive shells (still is). 

I'm fully aware that the (!) flag is a part of named references, so not already present in any released version of Zsh. Since many aspects of named references seem to be modelled on ksh's named references, I was a little surprised to discover that the (!) flag differs so much in the two shells. As already mentioned, I personally think it's perfectly fine. I suspect that this difference isn't obvious to everyone interested in named references. I thought it was worthwhile to point it out now, while things can still be changed, just in case anyone has a strong objection to it.

Philippe



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