I thought about that as I posted using "which," but I thought csh was the
default shell. Not that I checked, since I use tcsh.

I don't think that bash stores and hashes the available files, and I'm not
sure which environment variable it uses to check for paths. Sorry for the
confusion and I'm happy to hear it's working for you now.

On Fri, 22 Nov 2002, Viktor Haag wrote:

> Massimo Marino writes:
>  >
>  > Does bash behave differently from (t)csh? I did not check the
>  > PATH because /sw/bin/emacs is exactly what I wanted but still
>  > /usr/bin/emacs was the one got called. How 'which' in bash
>  > gets updated? any 'rehash' equivalent?
>
> Bash doesn't have a 'which' builtin like csh does, and therefore
> doesn't need a 'rehash'. When you use 'which' in bash, you're
> actually depending on another util.
>
> Here's something that might be useful to know: fink's which
> reports that it uses the environ's current $PATH to find the
> executable you specify. However, the man page for /usr/bin/which
> says that it looks instead in .cshrc and uses the PATH *there* to
> locate the file.
>
> If this is the case, then perhaps you set PATH in your .cshrc
> file, then 'source /sw/bin/init.csh' (which of course
> /usr/bin/which would ignore), and you're invoking /usr/bin/which
> for some reason (like you don't have /sw/bin/which installed?).
>
> /usr/bin/which then looks in .cshrc (even though its being
> invoked by bash), and finds the malformed PATH, and *voila*: you
> get the wrong location for a utility.
>
> You might try testing this with another utility that you also
> have in both the base install and in Fink...
>
>
> V.
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Fink-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/fink-users
>

-- 
Hisashi T Fujinaka - [EMAIL PROTECTED]
BSEE (6/86) + BSChem (3/95) + BAEnglish (8/95) + $2.50 = mocha latte


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Fink-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to