On 01.08.18 13:19, Christian Brabandt wrote:
>
> On Mi, 01 Aug 2018, 'Suresh Govindachar' via vim_use wrote:
>
> > Extract from replies: `which` does not report on what bash will execute;
> > `type` does. Although `type` provides info on whether the command is hashed
> > or not, `type -a` does not. `hash -r` clears the hash.
My take, FWIW, on `type -a` not reporting hash details is that it's only
an advantage, as the hash is just an irrelevant internal cache of paths,
without any effect on which executables are available, or which will be
executed.
> Just a related and imho interesting read about the gotchas of which and
> pros and cons of alternatives in various shells:
> https://unix.stackexchange.com/q/85249
Thanks Christian, for that informative history. It brings back memories
of why I aliased "which" to `type -a' over a quarter of a century ago.
ISTM that the "which" script, having never been fixed, remains unusable,
and "type" remains mnemonically indistinguishable from a print command,
so the alias continues to fix a broken situation, so long as we're on an
account we've set up. (It's far from the only thing in .bashrc &
.profile to make the raw shell usable.)
Erik
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Sunday, August 5, 2018
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment