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

Re: treatment of empty strings - why is this not a bug?



>>>>> Peter Stephenson <pws@xxxxxxx> writes:

> I think that's more likely to be a source of confusion rather than a
> help.  If you know about the problem you can already get round it.  If
> you don't the option isn't going to help.  The option's yet another
> headache for debugging.

If the NO_SH_WORD_SPLIT default is only to be the source of subtle
bugs and not actually useful, then it should be removed.

> Further, I don't think the option would be useful without syntax to
> restore the current behaviour for each variable (the opposite of
> double-quoting), since as Bart pointed out that's quite widely used.
> That adds yet another of layer of complexity and source of bugs.

I cannot believe it's widely used, except in legacy scripts that
predate array parameters.  Why would you put an empty string into a
variable unless you wanted it there?  I don't see any reason you'd
ever want the current behavior in a new script, and any existing
script should just emulate to the broken behavior.

greg



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