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

Re: newline grief



On 10/02/18 11:46 AM, Eric Cook wrote:

for aa in "${(f)$(typeset -m 'var*')}"; do
....

While all of it isn't applicable to zsh: this explains what happened in your case:
http://mywiki.wooledge.org/DontReadLinesWithFor

Thanks Eric, that works fine.  Bart's quoting by itself did not work.  I despair of every really understanding -- parsing in my own head -- how those syntaxes work.  I got as close as " ..."${(f) ... " but managed to drop the ball.  Thanks for that link, I had no idea for loops and while loops were really any different internally, is that widely known?

BTW, is there some way to get typeset to print out just the variables, not the values?  As I read the doc the '-m' switch seems not to like the '-H' or '+' switches, so it seems I can't have the globed variable name with no values printed.  It seems an unlikely limitation.




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