[PATCH]: Create vim -> vi alias

beck0778 at umn.edu beck0778 at umn.edu
Fri Jun 20 20:38:26 UTC 2008


On Jun 20 2008, Denys Vlasenko wrote:

>On Friday 20 June 2008 19:10, beck0778 at umn.edu wrote:
>> On Jun 20 2008, Bernhard Fischer wrote:
>> 
>> >On Fri, Jun 20, 2008 at 11:55:17AM -0500, beck0778 at umn.edu wrote:
>> >> Hello,
>> >>
>> >> I'm not sure if this would be useful to anyone else. On our embedded 
>> >> product we don't have support for shell command aliases, and I'm in 
>> >> the habit of typing 'vim' instead of 'vi'. This patch adds a 
>> >> configurable option to allow busybox to respond to both 'vim' and 
>> >> 'vi'.
>> >
>> >Personally, I don't think that such a patch makes sense, fwiw.
>> >
>> >what about
>> >ln -s vi /bin/vim
>> >instead?
>> >
>> 
>> You mean something like this, where vi is linked to busybox, and vim is 
>> linked to vi?
>> 
>> /bin > ls -l vi*
>> lrwxrwxrwx    1 root     root            7 Jun 20 11:21 vi -> busybox
>> lrwxrwxrwx    1 root     root            2 Jun 20 12:07 vim -> vi
>> 
>> I tried this, and it appears that even though vim is linked to busybox 
>> "through" vi, busybox still figures out that it's being called as vim, 
>> an applet name it doesn't recognize.
>> 
>> If you know of another way to accomplish this, please let me know.
>
>#!/bin/sh
>exec vi "$@"
>
There we go. That will certainly do what I was looking for. Thank you.

--Matthew



More information about the busybox mailing list