Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: listing all executables by prefix - solution!
- X-seq: zsh-users 4833
- From: Sven Guckes <guckes@xxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: listing all executables by prefix - solution!
- Date: Mon, 15 Apr 2002 21:43:25 +0200
- In-reply-to: <1020415175632.ZM9319@xxxxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: Sven Guckes <guckes@xxxxxxxxxxxxxxxxx>, zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20020415173132.GA19444@xxxxxxxxxxxxxxxxxxxxxx> <1020415175632.ZM9319@xxxxxxxxxxxxxxxxxxxxxxx>
* Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> [2002-04-15 17:56]:
> ls -l ${(@)$(hash -m prefix\*)#*=}
thanks, Bart! :-)
but there must be something about
what Peter Stephenson said in his mail,
because his version works always. so
now I'm using "whence" in my function:
# function _lap { for i in ${(@)$(hash -m $1\*)#*=}; do ls -l $i; done}
function _lap { for i in "${(@f)$(whence -pm $1\*)}"; do ls -l $i; done}
zsh> _lap zsh
-rwxr-xr-x 2 guckes emailer 456536 Oct 29 03:32 /home/sguckes/bin/zsh-4.0.4
-rwxr-xr-x 1 root root 405212 Jun 23 1999 /import/local/bin/zsh-3.0.5
-rwxr-xr-x 3 root other 492576 Mar 24 2001 /import/local/bin/zsh-3.0.6
-rwxr-xr-x 3 root other 492576 Mar 24 2001 /import/local/bin/zsh-3.0.8
-rwxr-xr-x 2 guckes emailer 456536 Oct 29 03:32 /home/sguckes/bin/zsh
cool! :-)
Sven [trying to figure out how it all works]
--
"it must be wonderful - i
dont understand it at all!" ;-)
vim: nowrap
Messages sorted by:
Reverse Date,
Date,
Thread,
Author