From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16930 invoked by alias); 3 Aug 2010 14:56:10 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 15239 Received: (qmail 15079 invoked from network); 3 Aug 2010 14:56:07 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00,URIBL_BLACK autolearn=no version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at dan.emsphone.com does not designate permitted sender hosts) Date: Tue, 3 Aug 2010 09:46:57 -0500 From: Dan Nelson To: Manuel Presnitz Cc: zsh-users@zsh.org Subject: Re: Problem with "?" symbol Message-ID: <20100803144657.GC58235@dan.emsphone.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 8.1-PRERELEASE User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: clamav-milter 0.96 at email1.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (email1.allantgroup.com [199.67.51.78]); Tue, 03 Aug 2010 09:46:58 -0500 (CDT) X-Scanned-By: MIMEDefang 2.45 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) > 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@allantgroup.com