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.000000000 -0500
+++ busybox-1.10.3_vim/editors/Config.in 2008-06-20 11:44:11.000000000 -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.000000000 -0500
+++ busybox-1.10.3_vim/include/applets.h 2008-06-20 11:43:16.000000000 -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
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox