Executable confusion!
Bill Jonas
bill at billjonas.com
Wed Oct 5 06:59:16 MST 2005
On Tue, Oct 04, 2005 at 09:56:24PM -0700, Alan Dayley wrote:
> I'm still confused. Shouldn't the $PATH specify the order in which
> commands are searched for? There must be some other shell configuration
> that redirects to /usr/bin first.
As Kenneth said, it may be an alias hanging around. (I'd use "type"
instead of "which --all" to verify, since the former is a bash builtin.)
Also try starting a new shell. Login to another VC, launch another
xterm, or just run "exec /bin/bash --login" in a running shell (after
making sure you have no jobs suspended or running in the background). I
could be off here, but I suspect that the problem may lie with the way
bash will cache the location of commands that have been run.
$ type vim
vim is /usr/bin/vim
$ vim
:q
$ type vim
vim is hashed (/usr/bin/vim)
$
It *ought* to notice that there's a new command in the search path
before the old one and execute that instead, but I've noticed funkiness
before. Try it from a new shell. Alternatively, I suppose you could
try the "hash" command; it's another builtin, so see bash(1) for
details. I've never used it, though.
--
Bill Jonas * bill at billjonas.com * http://www.billjonas.com/
"It's a dangerous business, Frodo, going out your front door. You step
into the Road, and if you don't keep your feet, there is no knowing
where you might be swept off to." -- Bilbo Baggins
More information about the PLUG-discuss
mailing list