Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: alias limg='ls *.{jpg,gif}(.N)'



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