Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Suppressing failed glob patterns
- X-seq: zsh-users 13527
- From: "Benjamin R. Haskell" <zsh@xxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxxxxx>
- Subject: Re: Suppressing failed glob patterns
- Date: Thu, 4 Dec 2008 16:30:58 -0500 (EST)
- In-reply-to: <gh9hq5$ano$1@xxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <gh9g43$rt5$1@xxxxxxxxxxxxx> <20081204210441.GJ2692@xxxxxxxxxxxxxxx> <gh9hq5$ano$1@xxxxxxxxxxxxx>
On Thu, 4 Dec 2008, Thorsten Kampe wrote:
Yes, I know about that. And that's what I've been using until now. But
it's also exactly what I not what. I don't what to give the command an
empty pattern. Compare:
% rm non-existing-file.*
zsh: no matches found: non-existing-file.*
% rm non-existing-file.*(N)
rm: missing operand
Try `rm --help' for more information.
I just want rm not to be executed (like it's the default) but without
the error (which is fine when I do it interactively but not in a
script).
Thorsten
You want both of the things suggested in this thread ('-f' and '(N)'):
# original problem
$ rm non-existing-file.*
zsh: no matches found: non-existing-file.*
# '-f' doesn't solve 'no matches'
$ rm -f non-existing-file.*
zsh: no matches found: non-existing-file.*
# '(N)' doesn't solve the 'missing operand'
$ rm non-existing-file.*(N)
rm: missing operand
Try `rm --help' for more information.
# '(N)' solves one, '-f' solves the other
$ rm -f non-existing-file.*(N)
$
Best,
Ben
Messages sorted by:
Reverse Date,
Date,
Thread,
Author