Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: how to show all parms matching a given substring?
- X-seq: zsh-users 8159
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: how to show all parms matching a given substring?
- Date: Wed, 3 Nov 2004 18:53:39 -0800 (PST)
- In-reply-to: <200411031447.50010.scowles@xxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <200411031447.50010.scowles@xxxxxxxxxxxxx>
- Reply-to: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
On Wed, 3 Nov 2004, S. Cowles wrote:
> I would like to solicit suggestions from others about a better, simpler
> way to get all parameters in the current context matching a given
> substring. If this can be done using parameter expansion patterns, so
> much the better.
The parameter names only case is just
typeset +m ${spatt}
and the names-and-values case is
print -l -- ${${(f)"$(typeset -x)"}:#${~spatt}}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author