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

Re: listing all executables by prefix?



"Bart Schaefer" wrote:
> 
> 	ls -l ${(@)$(hash -m prefix\*)#*=}

I think you have to be a bit careful that the hash database is set up;
it isn't immediately after zsh -f or a rehash.  I don't think you lose
much by using

ls -l "${(@f)$(whence -pm prefix\*)}"

instead.  (Of course you really need to check the expansion isn't going
to be empty first.)

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************



Messages sorted by: Reverse Date, Date, Thread, Author