From: Lloyd Zusman <ljz@asfast.com>
To: zsh-users@sunsite.dk
Subject: Re: Suppressing "no matches found" Glob Message?
Date: Tue, 29 Jun 2004 05:56:12 -0400 [thread overview]
Message-ID: <m31xjyvgar.fsf@asfast.com> (raw)
In-Reply-To: <20040629085235.GC3953@DervishD>
¡Hola Raúl!
DervishD <raul@pleyades.net> writes:
> [ ... ]
>
> * Aaron Davies <agdavi01@louisville.edu> dixit:
>> That wouldn't be so bad, actually; I could redirect that error to
>> /dev/null. So, does anyone know how to set that option in a pattern?
>
> I don't know. I've took a look at the manual and I haven't found
> anything about it. Anyway, if you are using such pattern you're bound
> to zsh, so, why not using 'print' instead of 'ls'? Using the 'stat'
> module of zsh will give you all information 'ls' gives.
>
> Otherwise, your solution of redirecting the error is good. You
> just need a shell function in order to set the NOMATCH option,
> something like (I'm writing on the fly, so it's untested):
>
> function special_ls() {
>
> emulate -L zsh
> setopt NOMATCH
>
> ls **/*(.) >& /dev/null
>
> return 0
> }
That will print nothing _except_ a possible error message!
How about this?
function special_ls() {
emulate -L zsh
setopt NOMATCH
{ ls **/*(.) } 2>/dev/null
return 0
}
--
Lloyd Zusman
ljz@asfast.com
God bless you.
next prev parent reply other threads:[~2004-06-29 9:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-27 2:39 Aaron Davies
2004-06-27 10:42 ` DervishD
2004-06-27 22:50 ` Aaron Davies
2004-06-28 8:53 ` DervishD
2004-06-28 22:53 ` Aaron Davies
2004-06-29 8:52 ` DervishD
2004-06-29 9:56 ` Lloyd Zusman [this message]
2004-06-29 10:41 ` DervishD
2004-06-29 16:12 ` Bart Schaefer
2004-06-29 16:34 ` DervishD
2004-06-29 23:04 ` Aaron Davies
2004-06-30 10:10 ` Bart Schaefer
2004-07-01 4:28 ` Aaron Davies
2004-06-27 22:52 ` Aaron Davies
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=m31xjyvgar.fsf@asfast.com \
--to=ljz@asfast.com \
--cc=zsh-users@sunsite.dk \
/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).