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

Re: Ignore certain glob characters?



2009/2/10 Peter Stephenson <pws@xxxxxxx>:
> "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.

What about that magic-url-quote-insert or whatever it was called? (not
home so cant check manpage right now)

-- 
Mikael Magnusson



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