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 13:04:18 -0800	[thread overview]
Message-ID: <a43d273c-8f7b-e38b-e9b1-e3afd546ad53@eastlink.ca> (raw)
In-Reply-To: <1518292490.2957397.1266471496.0E56DD5C@webmail.messagingengine.com>

On 10/02/18 11:54 AM, Daniel Shahaf wrote:
> Eric Cook wrote on Sat, 10 Feb 2018 14:46 -0500:
>> for aa in "${(f)$(typeset -m 'var*')}"; do
> There's an API for this information:
>
> for parameter_name in ${(k)parameters[(I)var*]} ; do
>
>
What do you mean "an API"?  Application Program Interface ??  Anyway 
your line solves my problem perfectly:

$ for parameter_name in ${(k)parameters[(I)var*]} ; do set ${parameter_name}=; done

... arbitrary list of variables all nulled.  This could be useful for 
cleaning up after some messy function.

Many thanks.



  parent reply	other threads:[~2018-02-10 21:04 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 [this message]
2018-02-10 21:36       ` Daniel Shahaf
2018-02-10 22:47         ` Ray Andrews
2018-02-10 20:36   ` Ray Andrews

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=a43d273c-8f7b-e38b-e9b1-e3afd546ad53@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).