zsh-users
 help / color / mirror / code / Atom feed
From: "Benjamin R. Haskell" <zsh@benizi.com>
To: Nadav Har'El <nyh@math.technion.ac.il>
Cc: Dan Nelson <dnelson@allantgroup.com>,
	Manuel Presnitz <mpy@gmx.net>,
	 zsh-users@zsh.org
Subject: Re: Problem with "?" symbol
Date: Sun, 8 Aug 2010 09:50:58 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LNX.2.01.1008080934340.19568@hp> (raw)
In-Reply-To: <20100808124924.GB14294@fermat.math.technion.ac.il>

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


  reply	other threads:[~2010-08-08 13:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-03 13:35 Manuel Presnitz
2010-08-03 14:46 ` Dan Nelson
2010-08-03 21:05   ` Vincent Lefevre
2010-08-08 12:49   ` Nadav Har'El
2010-08-08 13:50     ` Benjamin R. Haskell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-08-03 12:26 Volodya Khomchak
2010-08-03 12:35 ` Alexey I. Froloff
2010-08-03 13:06   ` René 'Necoro' Neumann
2010-08-03 15:17     ` Bart Schaefer
2010-08-03 12:39 ` Jérémie Roquet
2010-08-03 12:50   ` Vincent Lefevre
2010-08-03 12:46 ` Vincent Lefevre
2010-08-08 12:10 ` Bryan Hunt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LNX.2.01.1008080934340.19568@hp \
    --to=zsh@benizi.com \
    --cc=dnelson@allantgroup.com \
    --cc=mpy@gmx.net \
    --cc=nyh@math.technion.ac.il \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).