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

Re: Null tilde expansions?



"Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx> writes:

> On Oct 6, 11:16am, Greg Badros wrote:
> } Subject: Null tilde expansions?
> }
> } Is there any way to make ~notauser not cause an error (similar to the
> } null globbing option)?
> 
> unsetopt badpattern
> users=(`ypcat group  | awk -F: '/^oo_gang\>/ { printf $4 }' | tr , ' '`)
> dirs=(~$^users)
> dirs=(${(M)dirs:#~)

This doesn't work for me with Zsh 3.1.4 (few if any patches) or Zsh 3.0.5:

% unsetopt badpattern
% echo ~notauser
zsh: no such user or named directory: notauser

The badpattern option does look like the right thing, but perhaps it's broken?

Thanks for the response...

Greg



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