Zsh Mailing List Archive
Messages sorted by:
Re: Suppressing "no matches found" Glob Message?
- X-seq: zsh-users 7623
- From: Aaron Davies <agdavi01@xxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Suppressing "no matches found" Glob Message?
- Date: Tue, 29 Jun 2004 19:04:00 -0400
- In-reply-to: <Pine.LNX.4.60.0406280814510.19831@xxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <2A3E94EA-C7E3-11D8-9C37-000502631FBD@xxxxxxxxxxxx> <20040627104222.GA237@DervishD> <6D3CE77E-C88C-11D8-A1EE-000A95EDC31A@xxxxxxxxxxxxxx> <20040628085300.GA1443@DervishD> <Pine.LNX.4.60.0406280814510.19831@xxxxxxxxxxxxxxxxxx>
On Jun 29, 2004, at 12:12 PM, Bart Schaefer wrote:
On Mon, 28 Jun 2004, DervishD wrote:
In certain sense, what you want is impossible. If you issue the
command with parameters, it will list those parameters (if they
but if you don't give it params, it will list all files and dirs. You
cannot have a way of 'ls' shutting its mouth up if the pattern doesn't
Well, no, but you can have zsh not call "ls" in the first place if the
pattern doesn't match anything.
You're on the right track in a later posting on this thread where you
a function rather than an alias. Aliases can't do anything but simple
text replacements which happen before any of the glob patterns or other
expansions are evaluated. If you want to base a decision on the
an expansion, you must use a function.
In this case, something like
files=( **/*(.N) )
if (( $#files ))
print -u2 "Dude, where's my file?"
This works great on one of the boxes I use zsh on (a OS X Panther) box,
but not on the other (a Jaguar box). On the 10.2 one, I get
zsh: lspf: function definition file not found
when I try to run the function, despite having
in .zshrc and the above definition for lspf in
~/Documents/functions/lspf.sh . What's wrong?
Of course, when I try that, I get "argument list too long: ls" but
a different issue.
Messages sorted by: