From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4549 invoked by alias); 8 Aug 2010 13:58:22 -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: 15258 Received: (qmail 23747 invoked from network); 8 Aug 2010 13:58:19 -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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at benizi.com designates 64.130.10.15 as permitted sender) Date: Sun, 8 Aug 2010 09:50:58 -0400 (EDT) From: "Benjamin R. Haskell" To: Nadav Har'El cc: Dan Nelson , Manuel Presnitz , zsh-users@zsh.org Subject: Re: Problem with "?" symbol In-Reply-To: <20100808124924.GB14294@fermat.math.technion.ac.il> Message-ID: References: <20100803144657.GC58235@dan.emsphone.com> <20100808124924.GB14294@fermat.math.technion.ac.il> User-Agent: Alpine 2.01 (LNX 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Sun, 8 Aug 2010, Nadav Har'El wrote: > On Tue, Aug 03, 2010, Dan Nelson wrote about "Re: Problem with "?" symbol": > > 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. > > When I last proposed making 'set +o nomatch' the default, like it is > in Bourne shell, Ksh, and Bash, I got similar feedback - that it is > dangerous because sometimes the wildcards do expand something, and > sometimes they don't, etc. But has this ever actually caused problems > for anybody? For me, it simply "does the right thing" most (if not > all) of the time. The "nomatch" error always reminds of those "you > forgot a semicolon at the end of the line" compilation errors in C - > if you know I forgot something, why not help me and fix it for me? :-) Detecting that something is wrong is much easier than knowing what the correct fix is. In the nomatch case, it bugs me (a lot) that other shells silently convert the input I've given them into something that is not equivalent. It commonly bites me with the '?' case (With '*' and '&', I usually notice that I need to quote something), but I'd much rather it complain than silently do something I don't intend. E.g. catching the typo in: mv otherstuff impotrant* /backup/ (Probably a lame example, but the point about not changing my input in ways I don't intend stands.) > And considering that people coming from other shells (not including > csh, which I wonder who continues to use) assume this feature, I still > wonder why it's not the default in zsh. For the same reason that SH_WORD_SPLIT isn't the default. "What other shells do" isn't always the best indication of what Zsh users want. (In my opinion, obviously.) -- Best, Ben