Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!yale!cmcl2!uupsi!sunic!ericom!eua.ericsson.se!erix.ericsson.se!per From: per@erix.ericsson.se (Per Hedeland) Newsgroups: comp.unix.shell Subject: Re: `which' in csh/Ultrix 4.1 Message-ID: <1991Mar9.200444.28944@eua.ericsson.se> Date: 9 Mar 91 20:04:44 GMT References: <18018@csli.Stanford.EDU> <5946@iron6.UUCP> Sender: news@eua.ericsson.se Organization: Ellemtel Telecom Systems Labs, Stockholm, Sweden Lines: 33 In article <5946@iron6.UUCP> yeates@motcid.UUCP (Tony J Yeates) writes: >The which in tcsh & csh is faulty, causing much confusion and wasted time. >The tcsh people are aware of this & it sounds like they will fix it in a >future release. Perhaps you could be a bit more specific about this - the only case where I know the built-in 'which' in the current version (5.20.2) of tcsh does the wrong thing is with "which ''builtin-or-alias" - but only Chris Torek does such things:-). Older versions of tcsh didn't handle "which 'builtin-or-alias'" or "which \builtin-or-alias" correctly - not so anymore. >I think tcsh currently uses the original csh code - so bugs, as well >as features, were inherited. This is pure nonsense, as the "original csh code" as far as tcsh is concerned - i.e. that of 4.2 or 4.3 BSD csh - doesn't have a builtin 'which'! According to the tcsh manual, the builtin 'which' was added by Rayan Zachariassen in 1984 - I don't really know if Ultrix had seen the light of day at that time, in any case I'm confident that he didn't get the code from Ultrix csh. As for Ultrix csh, I don't have access to 4.1, but in 4.0, 'which' is indeed builtin, while not documented as such. And while I wouldn't be surprised if yet another of Ultrix' "improvements" turned out to not be one, I can't reproduce the original poster's problems - for some incomprehensible reason, it doesn't know about csh builtins, but at least it pays attention to current $path and aliases, which the non-builtin 'which' in 4.2/3 BSD does not (for more-or-less obvious reasons). --Per Hedeland per@erix.ericsson.se