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

Re: newline grief



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.




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