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

references to empty variables dropped from arg lists



I find it a great shame that zsh drops empty variable references instead
of retaining them as empty args.  I mean that when you say

    program $foo

program might get 0 or 1 args depending on whether $foo is empty or not.
Similarly for array assignments.  It means that when programming I have
to do

    program "$foo"

just like in sh.  For arrays it's even worse -- "$array[@]" is a pain to
type and compared to $array a pain to look at.

For me this behavior eliminates most of the advantage of not splitting
variables in the first place.  I find that I want to retain empty
variables as separate args much more often than not.

It would be great if zsh provided a switch to control this behavior.

-- 
Roderick Schertler
roderick@xxxxxxxxx



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