Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: alias limg='ls *.{jpg,gif}(.N)'
- X-seq: zsh-users 9967
- From: Dan Nelson <dnelson@xxxxxxxxxxxxxxx>
- To: zzapper <david@xxxxxxxxxx>
- Subject: Re: alias limg='ls *.{jpg,gif}(.N)'
- Date: Tue, 28 Feb 2006 12:26:06 -0600
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <Xns9778B72CAF0AFzzappergmailcom@xxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <Xns9778B72CAF0AFzzappergmailcom@xxxxxxxxxxx>
In the last episode (Feb 28), zzapper said:
> I was proud of my little alias
>
> alias limg='ls *.{jpg,gif}(.N)'
>
> But it has a teeny-weeny fault; if no image is found it lists everything
How about:
alias limg='ls *.(jpg|gif)(.)'
which uses a single glob pattern and no NULL_GLOB, so zsh will complain
if the pattern doesn't match anything.
--
Dan Nelson
dnelson@xxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author