From: Hubert Canon <Hubert.Canon@irisa.fr>
To: zsh-users@sunsite.auc.dk
Subject: Re: listing all executables matching 'foo'
Date: Wed, 25 Aug 1999 16:22:23 +0200 [thread overview]
Message-ID: <19990825162223.A18978@youkaidi.irisa.fr> (raw)
In-Reply-To: <19990825154631.C2803@ritz.math.fu-berlin.de>
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
next prev parent reply other threads:[~1999-08-25 14:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-08-23 13:22 cd directory completion? Dominik Vogt
1999-08-23 13:35 ` Andre Pang
1999-08-23 14:07 ` Dominik Vogt
1999-08-23 15:03 ` Sweth Chandramouli
1999-08-25 13:46 ` listing all executables matching 'foo' Sven Guckes
1999-08-25 14:22 ` Hubert Canon [this message]
1999-08-25 14:53 ` Sven Guckes
1999-08-25 14:59 ` Paul Lew
1999-08-26 3:59 ` James Cribb
1999-08-26 12:27 ` Sven Guckes
1999-08-26 16:24 ` Sweth Chandramouli
1999-08-25 4:32 ` cd directory completion? Bek Oberin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19990825162223.A18978@youkaidi.irisa.fr \
--to=hubert.canon@irisa.fr \
--cc=zsh-users@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).