rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: culliton@srg.srg.af.mil (Tom Culliton x2278)
To: cks@hawkwind.utcs.toronto.edu, rc@hawkwind.utcs.toronto.edu
Subject: Re: Things I'd like whatis to have:
Date: Wed, 10 Mar 1993 17:16:16 -0500	[thread overview]
Message-ID: <9303101716.aa10551@ceres.srg.af.mil> (raw)

To me this seems like an idea worth at least considering, it would also
be nice to have an option to see the whole chain of candidates.  (the
function and possibly the builtin or executable(s))  I once had a
function, that called a script, that called the binary, all with the
same name, and it stopped working when another version appeared in my
path.  (Memory falters on whether this was from changing the $path or
an executable in a new place.)

I ended up writing the following rc function to tell me where an
executable was (or could be) coming from.  It should probably also
check if there is a function by the name given, before listing the
executable files, but I tend to know what functions are in my .rcrc
file.

fn whereis { i=() p=() { 
	for (i)
		for (p in $path)
			if (test -f $p/$i -a -x $p/$i)
				echo $p/$i
}}


             reply	other threads:[~1993-03-10 23:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-03-10 22:16 Tom Culliton x2278 [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-03-11 15:49 rsalz
1993-03-10 23:21 Tom Culliton x2278
1993-03-10 21:36 rsalz
1993-03-10 21:22 Chris Siebenmann
1993-03-10 21:29 ` mycroft

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=9303101716.aa10551@ceres.srg.af.mil \
    --to=culliton@srg.srg.af.mil \
    --cc=cks@hawkwind.utcs.toronto.edu \
    --cc=rc@hawkwind.utcs.toronto.edu \
    /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.
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).