| 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 |
| Subject: | Cygwin "which" and aliases |
| To: | cygwin AT cygwin DOT com |
| X-Mailer: | Lotus Notes Release 5.0.1b September 30, 1999 |
| Message-ID: | <OFAEF7E20A.2ADD4779-ON88256AE3.0072B5E9@redlake.com> |
| From: | RCUNNINGHAM AT redlake DOT com |
| Date: | Fri, 12 Oct 2001 13:55:40 -0700 |
| X-MIMETrack: | Serialize by Router on notes1/RSMASD(Release 5.0.2c |February 2, 2000) at |
| 10/12/2001 01:56:10 PM | |
| MIME-Version: | 1.0 |
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 |