zsh-users
 help / color / mirror / code / Atom feed
From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: Re: newline grief
Date: Sat, 10 Feb 2018 12:36:20 -0800	[thread overview]
Message-ID: <a40c2483-f3c9-ed4e-3a75-eb993a53473c@eastlink.ca> (raw)
In-Reply-To: <e85defb8-e026-2232-33bd-20deb36f330c@gmx.com>

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.



      parent reply	other threads:[~2018-02-10 21:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-10 19:02 Ray Andrews
2018-02-10 19:36 ` Bart Schaefer
2018-02-10 19:38   ` Eric Cook
2018-02-10 19:46 ` Eric Cook
2018-02-10 19:54   ` Daniel Shahaf
2018-02-10 20:09     ` Eric Cook
2018-02-10 21:07       ` Ray Andrews
2018-02-10 21:04     ` Ray Andrews
2018-02-10 21:36       ` Daniel Shahaf
2018-02-10 22:47         ` Ray Andrews
2018-02-10 20:36   ` Ray Andrews [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a40c2483-f3c9-ed4e-3a75-eb993a53473c@eastlink.ca \
    --to=rayandrews@eastlink.ca \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).