Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!samsung!sol.ctr.columbia.edu!cunixf.cc.columbia.edu!lamont!dale From: dale@lamont.ldgo.columbia.edu (dale chayes) Newsgroups: comp.sys.sgi Subject: Re: which and the current directory Summary: Details, details.... Keywords: /usr/bsd/which and path Message-ID: <3532@lamont.ldgo.columbia.edu> Date: 25 Mar 91 14:00:05 GMT References: <3531@lamont.ldgo.columbia.edu> Organization: Lamont-Doherty Geological Observatory N.Y. Lines: 42 Last night, I posted a note about problems with "which" not finding files in the current directory: > > In article <3531@lamont.ldgo.columbia.edu>, dale@lamont.ldgo.columbia.edu (dale chayes) writes: > > > > I found (after too much exploration (;-)) that /usr/bsd/which will not > > find an executable in the current directory if is specified in the > > environment's $path as in: > > > > set path = (. ~/bin /usr/bsd /bin /usr/bin /usr/sbin /usr/local/bin) > > > > The shell (at least csh) finds them with out trouble (as > > long as they are really there!) > > I got an e-mail message shortly after posting from Brendan (at sgi) confirming that which worked properly for him, so I dug deeper. Which is a shell script (/usr/bsd/which) and SGI has added optional args including -f (but not -x) which is the "fast" version and does not source ~/.cshrc. Using this option, which did find the local prog. So, that meant that it was probably a problem with my very own .cshrc file. I found that I was unconditionaly setting my prompt which everyone knows is not a "good thing" and can interfere with all kinds of programs and scripts. After I fixed my .cshrc not only did which work right, but M-x compile (in emacs) started working (the grand total of progress for yesterday (;-)). This morning, Vern (at sgi) posted a note similar to Brendan's mail and I got an email message from Brent (at NASA) all confirming that which worked for them. To all who replied, thanks. Dale -- Dale Chayes Lamont-Doherty Geological Observatory of Columbia University Route 9W, Palisades, N.Y. 10964 dale@lamont.ldgo.columbia.edu voice: (914) 359-2900 extension 434 fax: (914) 359-6817