Wednesday, July 10, 2019

OT: aliases vs functions vs executables

On 7/10/19 3:25 AM, Mathieu Roux wrote:
> I love aliases since i am a child! i am absolutely fascinated by them!
> i dream of them every night:-)

Aliases can be quite useful. But they generally only work /in/ /the/
/shell/. If you want to use (something like) an alias /outside/ /of/
/the/ /shell/ you quite likely need to use something other than an alias.

Scripts or other executables—that are in the $PATH—are quite good for this.

The 3rd alternative, function, will likely have the same limitations as
aliases.

As a general rule, if I want to use something outside of the interactive
shell, I use an executable. This applies equally as well to things like
running :!theCommand from within vim to running theCommand remotely via
ssh to creating desktop shortcuts that search the $PATH.



--
Grant. . . .
unix || die

--
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/bb591a4f-b655-0aba-7b80-96143fda1377%40spamtrap.tnetconsulting.net.
For more options, visit https://groups.google.com/d/optout.

No comments: