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

Re: mysterious newline





On 2026-11-19 20:59, Mark J. Reed wrote:
That code doesn't append any newlines. It builds an array of lines. All the final2+=" " code does is insert an entry into the array that's nothing but a space. The space isn't needed; it could just be the empty string.
Always the ghost of C haunts the mansion.  Even when I'm right I'm subtly wrong.  Yes, empty element is the way to think about it.  Tx. 

The default separator for those [w]ords is $IFS so $var[(w)1]
is similar to ${${=var}[1]}.

Gotta learn these 'subscript flags'. Half the battle is knowing what various syntactic elements are even called. Googling for '(w)' isn't helpful. AI is getting useful tho, it says that 'substring qualifier' is correct, but I expect that 'subscript flag' is just as good. 





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