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

Re: Using file lines as "input files"



On Sat, Jul 9, 2022 at 8:27 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> The leading "nonexistent" elements become one word, and the remaining
> element with a value becomes another.  I'm not sure why that happens.

In fact any series of "unset" elements becomes an (empty) word.

% foo[9]=x
% foo[18]=''
% unset foo\[18\]
% print $#foo
18
% setopt shwordsplit
% print a${^foo}b
ab axb ab




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