Re: [PATCH]: Create vim - vi alias

2008-06-21 Thread walter harms

actually i did not try it but was is wrong with:
alias vim=vi

re,
 wh



[EMAIL PROTECTED] wrote:
 On Jun 20 2008, Denys Vlasenko wrote:
 
 On Friday 20 June 2008 19:10, [EMAIL PROTECTED] wrote:
 On Jun 20 2008, Bernhard Fischer wrote:

 On Fri, Jun 20, 2008 at 11:55:17AM -0500, [EMAIL PROTECTED] 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*
 lrwxrwxrwx1 root root7 Jun 20 11:21 vi - busybox
 lrwxrwxrwx1 root root2 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
 ___
 busybox mailing list
 busybox@busybox.net
 http://busybox.net/cgi-bin/mailman/listinfo/busybox
 
 
 
___
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox


[PATCH]: Create vim - vi alias

2008-06-20 Thread beck0778

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


Sorry if this has been discussed before, or if this is not appropriate / 
desired in busybox.


--Matthew
diff -Naur busybox-1.10.3/editors/Config.in busybox-1.10.3_vim/editors/Config.in
--- busybox-1.10.3/editors/Config.in	2008-04-18 22:50:38.0 -0500
+++ busybox-1.10.3_vim/editors/Config.in	2008-06-20 11:44:11.0 -0500
@@ -185,6 +185,13 @@
 	  This will make the cursor movement faster, but requires more memory
 	  and it makes the applet a tiny bit larger.
 
+config FEATURE_VI_VIM_ALIAS
+	bool Create vim - vi alias
+	default y
+	depends on VI
+	help
+	  This will create a vim - vi alias
+
 config FEATURE_ALLOW_EXEC
 	bool Allow vi and awk to execute shell commands
 	default y
diff -Naur busybox-1.10.3/include/applets.h busybox-1.10.3_vim/include/applets.h
--- busybox-1.10.3/include/applets.h	2008-04-18 22:50:36.0 -0500
+++ busybox-1.10.3_vim/include/applets.h	2008-06-20 11:43:16.0 -0500
@@ -383,6 +383,7 @@
 USE_UUENCODE(APPLET(uuencode, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
 USE_VCONFIG(APPLET(vconfig, _BB_DIR_SBIN, _BB_SUID_NEVER))
 USE_VI(APPLET(vi, _BB_DIR_BIN, _BB_SUID_NEVER))
+USE_FEATURE_VI_VIM_ALIAS(APPLET_NOUSAGE(vim, vi, _BB_DIR_BIN, _BB_SUID_NEVER))
 USE_VLOCK(APPLET(vlock, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS))
 USE_WATCH(APPLET(watch, _BB_DIR_BIN, _BB_SUID_NEVER))
 USE_WATCHDOG(APPLET(watchdog, _BB_DIR_SBIN, _BB_SUID_NEVER))
___
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Re: [PATCH]: Create vim - vi alias

2008-06-20 Thread Bernhard Fischer
On Fri, Jun 20, 2008 at 11:55:17AM -0500, [EMAIL PROTECTED] 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?
___
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox


Re: [PATCH]: Create vim - vi alias

2008-06-20 Thread beck0778
On Jun 20 2008, Bernhard Fischer wrote:

On Fri, Jun 20, 2008 at 11:55:17AM -0500, [EMAIL PROTECTED] 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*
lrwxrwxrwx1 root root7 Jun 20 11:21 vi - busybox
lrwxrwxrwx1 root root2 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.
___
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox


Re: [PATCH]: Create vim - vi alias

2008-06-20 Thread Denys Vlasenko
On Friday 20 June 2008 19:10, [EMAIL PROTECTED] wrote:
 On Jun 20 2008, Bernhard Fischer wrote:
 
 On Fri, Jun 20, 2008 at 11:55:17AM -0500, [EMAIL PROTECTED] 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*
 lrwxrwxrwx1 root root7 Jun 20 11:21 vi - busybox
 lrwxrwxrwx1 root root2 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 $@

--
vda
___
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox


Re: [PATCH]: Create vim - vi alias

2008-06-20 Thread beck0778
On Jun 20 2008, Denys Vlasenko wrote:

On Friday 20 June 2008 19:10, [EMAIL PROTECTED] wrote:
 On Jun 20 2008, Bernhard Fischer wrote:
 
 On Fri, Jun 20, 2008 at 11:55:17AM -0500, [EMAIL PROTECTED] 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*
 lrwxrwxrwx1 root root7 Jun 20 11:21 vi - busybox
 lrwxrwxrwx1 root root2 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
___
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox