delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT sources DOT redhat DOT com |
Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
Message-Id: | <5.1.0.14.2.20011012140538.02b65008@pop3.cris.com> |
X-Sender: | rrschulz AT pop3 DOT cris DOT com |
X-Mailer: | QUALCOMM Windows Eudora Version 5.1 |
Date: | Fri, 12 Oct 2001 14:08:08 -0700 |
To: | RCUNNINGHAM AT redlake DOT com, cygwin AT cygwin DOT com |
From: | Randall R Schulz <rrschulz AT cris DOT com> |
Subject: | Re: Cygwin "which" and aliases |
In-Reply-To: | <OFAEF7E20A.2ADD4779-ON88256AE3.0072B5E9@redlake.com> |
Mime-Version: | 1.0 |
Bob, It works fine: % which which which () /usr/bin/which % So I know there is both a binary (or a script) and a shell function. Very nice, actually. Are you using BASH? I don't think it would work in a CSH-compatible shell. Randall Schulz Mountain View, CA USA At 13:55 2001-10-12, RCUNNINGHAM AT redlake DOT com wrote: >I wanted to make my "which" command also show aliases, so I tried the >pretty macro from the which man page. It didn't work. > >I decided I also wanted to list functions, so I needed a better approach. >Here's my attempt at a bash function for which: > >which () >{ > builtin alias $* 2>|/dev/null; > set | grep ^$*; > /usr/bin/which $* 2>|/dev/null | grep -v ^no >} > > >Try entering "which which". > >Anyone know of an improved approach? > > >Regards, > >-BobC -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |