Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: 'whence' anomaly.
- X-seq: zsh-users 18670
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: 'whence' anomaly.
- Date: Mon, 24 Mar 2014 15:48:11 -0700
- In-reply-to: <53307744.9070008@eastlink.ca>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <XnsA2FA95D9D45BDdavidrayninfocouk@80.91.229.13> <CAH+w=7baCBR0KK+Uvhu8D53CPsVNvq4YSVsrbb35H1ReCHQZAA@mail.gmail.com> <XnsA2FAB2C8DE4F8davidrayninfocouk@80.91.229.13> <XnsA2FAB51B6E85Bdavidrayninfocouk@80.91.229.13> <53307744.9070008@eastlink.ca>
On Mar 24, 11:19am, Ray Andrews wrote:
}
} What causes this:
}
} > $ whence -m mplayer
} >
} > $ whence mplayer
} > /usr/bin/mplayer
} >
} > $ whence -m mplayer
} > /usr/bin/mplayer
I guess you could think of it as both/either a bug and/or a feature ...
"whence -m" searches, but does not populate, the command hash table.
Thus if the NO_HASH_CMDS option is set, "whence -m" does not work
at all. [*]
"whence" populates the hash table as a side-effect of searching $PATH,
presuming HASH_CMDS is set; but it might not fully populate the table
if HASH_DIRS is set, so "whence -m" of a different command from later
in the $PATH might still fail.
[*] Except that the CORRECT option also relies on the hash table, so
if that is set, as soon as anything might need correcting, the table
gets filled, and "whence -m" will start working again.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author