Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: listing all executables by prefix?
- X-seq: zsh-users 4831
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-users@xxxxxxxxxx (Zsh users list)
- Subject: Re: listing all executables by prefix?
- Date: Mon, 15 Apr 2002 19:16:54 +0100
- In-reply-to: ""Bart Schaefer""'s message of "Mon, 15 Apr 2002 17:56:32 -0000." <1020415175632.ZM9319@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
"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