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

Re: Ignore certain glob characters?



"Benjamin R. Haskell" wrote:
> I'd like to be able to specify that I want no_nomatch behavior for certain
> meta-characters. With Windows commands, a common flag is '/?' (usually the
> semantic equivalent of '--help'), and I'm getting sick of typing '/\?':
> 
> $ runas /?
> zsh: no matches found: /?

Assuming you never want to use /? as a glob expression,

  alias -g '/?=/\?'

will fix that one.  This may well be a better answer than what you're
asking for, since otherwise commands like the one you show become
dependent on what's in the root directory.

> The other place this comes up is when pasting URLs into the terminal (both 
> Windows/non):
> 
> $ wget http://example.com/probably?param=eters
> zsh: no matches found: http://example.com/probably?param=eters

I would suspect you don't need globbing at all with wget, if you use it
for standard purposes, in which case the usual workaround,

  alias wget='noglob wget'

whould be OK.  I can't offhand think of a reason you'd need to wget a
globbing expression, but that's without diving into the manual.

I can't think of any answers that give you more general control.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



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