Tuesday, July 31, 2018

Re: Interloper vi

On Wednesday, August 1, 2018 at 4:24:14 PM UTC+12, Suresh Govindachar wrote:
...
> $ alias vi
> bash: alias: vi: not found

reveals your shell is bash.

> $ which vi
> /lhome/me/tools/bin/vi

"which" is not what you want with bash. It is /usr/bin/which, not a bash built-in, so it doesn't tell you what bash will do. In a new bash window, if I run:

$ type vim
vim is /usr/local/bin/vim
$ vim -c q
# the screen clears...
$ which vim
/usr/local/bin/vim
$ type vim
vim is hashed (/usr/local/bin/vim)

So, better use "type". Seeing vim hashed to something you don't expect would at least be a hint towards Tony's advice to try hash -r.

Regards, John Little

--
--
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.

No comments: