Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Problem with "?" symbol
- X-seq: zsh-users 15239
- From: Dan Nelson <dnelson@xxxxxxxxxxxxxxx>
- To: Manuel Presnitz <mpy@xxxxxxx>
- Subject: Re: Problem with "?" symbol
- Date: Tue, 3 Aug 2010 09:46:57 -0500
- Cc: zsh-users@xxxxxxx
- In-reply-to: <aug3-8425220102@xxxxxxxxxxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <aug3-8425220102@xxxxxxxxxxxxxxxxx>
In the last episode (Aug 03), Manuel Presnitz said:
> > The ? is a special character for the shell (which cannot know
> > whether the argument is a filename or not). There are 2 solutions:
> >
> > 1. Quote the character manually (...)
> > 2. Quote the character automatically (...)
>
> I think there is also a third solution:
>
> Unset the option nomatch:
>
> $ zsh -f
> $ curl -vvv -k https://HOST.COM/page/page2/?virtual_serial=101032
> zsh: no matches found: https://HOST.COM/page/page2/?virtual_serial=101032
> $ unsetopt nomatch
> $ curl -vvv -k https://HOST.COM/page/page2/?virtual_serial=101032
> * About to connect() to HOST.COM port 443
> * Trying 208.73.210.28...
>
> The manual explains, what happens, when nomatch is set (which is the
> default for invokation as zsh):
>
> NOMATCH (+3) <C> <Z>
> If a pattern for filename generation has no matches, print an error,
> instead of leaving it unchanged in the argument list. This also applies
> to file expansion of an initial `~' or `='.
>
>
> I like this option, it is very handy, also for things like that:
> $ nmap -sP 192.168.1.*
This can get you into trouble if you happen to have files matching your
wildcard in the current directory. "noglob" completely disables globbing;
"NO_NOMATCH" still tries to match the wildcard but leaves it if there are no
matches.
--
Dan Nelson
dnelson@xxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author