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

Re: Null tilde expansions?



Greg Badros wrote:
> "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx> writes:
> % 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?

I think the appropriate option is 'nomatch'.  (Sounds OK to me, it's a
match that's failing rather than a pattern that's been typed wrongly.)

% setopt nomatch
% echo ~nouser
zsh: no such user or named directory: nouser
% setopt nonomatch
% echo ~nouser    
~nouser
% 

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarotti 2, 56100 Pisa, Italy



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