From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13251 invoked from network); 25 Aug 1999 13:50:24 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 25 Aug 1999 13:50:24 -0000 Received: (qmail 21870 invoked by alias); 25 Aug 1999 13:49:58 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2507 Received: (qmail 21863 invoked from network); 25 Aug 1999 13:49:58 -0000 Date: Wed, 25 Aug 1999 15:46:32 +0200 From: Sven Guckes To: zsh-users@sunsite.auc.dk Subject: Re: listing all executables matching 'foo' Message-ID: <19990825154631.C2803@ritz.math.fu-berlin.de> Mail-Followup-To: zsh-users@sunsite.auc.dk References: <19990823152219.I32224@hp.com> <19990823233551.B31064@drizzt.ihug.com.au> <19990823160716.M32224@hp.com> <19990823110321.A1724@cj952583-b.alex1.va.home.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre1i X-Old-Subject: Re: cd directory completion? In-Reply-To: <19990823110321.A1724@cj952583-b.alex1.va.home.com> X-Mailer: Mutt http://www.mutt.org/ X-Editor: Vim http://www.vim.org/ X-URL: www.guckes.net www.math.fu-berlin.de/~guckes * On Mon, Aug 23, 1999 at 04:07:16PM +0200, Dominik Vogt wrote: > # ls =filename > and hit TAB :-)) * Sweth Chandramouli (sweth@gwu.edu) [990823 15:03]: > yes, but that returns totally different information, especially in zsh, > [...] > (of course, then you have issues figuring out just what > `alias which=/bin/which ; alias which=$(whence -a which | head -1)' > does, but that's what makes playing with your shell fun.)) 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? Sven -- Sven Guckes guckes@math.fu-berlin.de using zsh-3.0.5 [961218] ZSH HomePage: http://www.zsh.org | Latest version: zsh-3.1.5 [981030] ZSH Pages: http://www.math.fu-berlin.de/~guckes/zsh/ Tips and tricks ZSH Tips: http://www.math.fu-berlin.de/~guckes/zsh/tips.html