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

Re: how to show all parms matching a given substring?



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