Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: listing all executables matching 'foo'
- X-seq: zsh-users 2508
- From: Hubert Canon <Hubert.Canon@xxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxx
- Subject: Re: listing all executables matching 'foo'
- Date: Wed, 25 Aug 1999 16:22:23 +0200
- In-reply-to: <19990825154631.C2803@xxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <19990823152219.I32224@xxxxxx> <19990823233551.B31064@xxxxxxxxxxxxxxxxxx> <19990823160716.M32224@xxxxxx> <19990823110321.A1724@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <19990825154631.C2803@xxxxxxxxxxxxxxxxxxxxxx>
Sven Guckes écrivait :
> Apropos:
>
> _listall () {
> if [[ $# = 0 ]]
> then
> echo "Usage: $0 program"
> echo "Example: $0 zsh"
> echo "Lists all occurrences of program in the current PATH."
> else
> for program in `which -a $1`
> do
> ls -lL $program
> done
> fi
> }
>
> Comments?
Gives strange things with aliases and functions :
% which -a which
which: aliased to which -a
which: shell built-in command
/bin/which
/usr/bin/which
% _listall which
ls: which:: No such file or directory
ls: aliased: No such file or directory
ls: to: No such file or directory
ls: which: No such file or directory
total 4
drwx------ 2 canon pampa 512 Aug 25 16:21 .
drwx------ 5 canon pampa 2560 Aug 25 16:21 ..
ls: which:: No such file or directory
ls: shell: No such file or directory
ls: built-in: No such file or directory
ls: command: No such file or directory
-r-xr-xr-x 1 bin bin 1155 Oct 25 1995 /bin/which
-r-xr-xr-x 1 bin bin 1155 Oct 25 1995 /usr/bin/which
--
Hubert Canon
Messages sorted by:
Reverse Date,
Date,
Thread,
Author