From owner-freebsd-current Mon Mar 6 16:34:18 2000 Delivered-To: freebsd-current@freebsd.org Received: from holly.calldei.com (adsl-208-191-146-189.dsl.hstntx.swbell.net [208.191.146.189]) by hub.freebsd.org (Postfix) with ESMTP id 1A4A837BD3C for ; Mon, 6 Mar 2000 16:34:11 -0800 (PST) (envelope-from chris@holly.calldei.com) Received: (from chris@localhost) by holly.calldei.com (8.9.3/8.9.3) id SAA09285; Mon, 6 Mar 2000 18:34:21 -0600 (CST) (envelope-from chris) Date: Mon, 6 Mar 2000 18:34:21 -0600 From: Chris Costello To: Matthew Hunt Cc: Garance A Drosihn , Laurence Berland , Chuck Robey , Alfred Perlstein , Dan Papasian , current@FreeBSD.ORG Subject: Re: which(1), rewritten in C? Message-ID: <20000306183420.A9184@holly.calldei.com> Reply-To: chris@calldei.com References: <38BF334F.2F10D4B0@confusion.net> <20000303120441.A56070@wopr.caltech.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/0.96.4i In-Reply-To: <20000303120441.A56070@wopr.caltech.edu> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Friday, March 03, 2000, Matthew Hunt wrote: > and the "type" builtin is too verbose, saying "which is hashed > (/usr/bin/which)." In ksh, `whence' is a bit equivalent to `which' (`type' in ksh is an alias to `whence -v'). From the AT&T ksh manual: whence [ -afpv ] name ... For each name, indicate how it would be interpreted if used as a command name. The -v option produces a more verbose report. The -f options skips the search for functions. The -p option does a path search for name even if name is an alias, a function, or a reserved word. The -a option is similar to the -v option but causes all interpretations of the given name to be reported. Which would yield the following behavior: $ whence pwd pwd $ whence -f pwd pwd $ whence -p pwd /bin/pwd $ whence -v pwd pwd is a shell builtin $ whence -a pwd pwd is a shell builtin pwd is a tracked alias for /bin/pwd -- |Chris Costello |A paperless office has about as much chance as a paperless bathroom. `-------------------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message