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
