From: Peter Stephenson <p.stephenson@samsung.com>
To: zsh-users@zsh.org
Subject: Re: "\rm -f" stops after the 1st glob not found
Date: Wed, 14 Aug 2013 10:53:04 +0100 [thread overview]
Message-ID: <20130814105304.0d21eb8d@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <CAMXWGTxJiYpsksFKfEi0=p+nj=O06YQorg3n5MOD8MpNxdQsjQ@mail.gmail.com>
On Wed, 14 Aug 2013 06:25:27 -0300
Leonardo Barbosa <barbosa.leonardo@gmail.com> wrote:
> I'm sure that's a simple questions, but the keywords are so common
> that i couldn't find the answer by googling them.
>
> My problem is this, when i type:
>
> \rm -f *.aux *.blg *.out *.ps *.log *.toc *.tcp *.idx *.bak *.tps
> *.ilg *.ind *.sty *.bst *.bbl
>
> zsh stops in the first glob it doesn't find. How could i fix this?
You need to change the options (using "setopt" in ~/.zshrc). There are
various things you can do.
setopt NULL_GLOB
simply removes completely all command line entries where the pattern
didn't expand to anything.
setopt CSH_NULL_GLOB
does the same, but if all patterns failed to expand it's an error (a bit
safer).
setopt NO_NOMATCH
leaves the argument unmodified --- this is what some other shells do, so
it might be your best bet. That means rm -f will try to remove files
called e.g. "*.bak", but the -f means that's OK.
There's a summary of all (well, some of) this in "From Bash to Z Shell"
chapter 9, page 211 (see www.bash2zsh.com for information about the
book).
pws
next prev parent reply other threads:[~2013-08-14 10:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-14 9:25 Leonardo Barbosa
2013-08-14 9:53 ` Peter Stephenson [this message]
2013-08-16 14:34 ` zzapper
2013-08-17 4:13 ` Bart Schaefer
2013-08-17 11:11 ` zzapper
2013-08-17 13:36 ` Aaron Schrab
2013-08-17 14:01 ` zzapper
2013-08-17 19:42 ` Bart Schaefer
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=20130814105304.0d21eb8d@pwslap01u.europe.root.pri \
--to=p.stephenson@samsung.com \
--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).