summaryrefslogtreecommitdiff
path: root/editors/vi.c
diff options
context:
space:
mode:
authorDenys Vlasenko2021-06-13 01:08:48 +0200
committerDenys Vlasenko2021-06-13 01:08:48 +0200
commit6b6826f0b87b13c5e83786f045b90d703507464e (patch)
treedc40238c9843b020fddfa7de83e25892b166dbe4 /editors/vi.c
parentaece2c5f0fef9088b615016f3177b1abd3a373bb (diff)
downloadbusybox-6b6826f0b87b13c5e83786f045b90d703507464e.zip
busybox-6b6826f0b87b13c5e83786f045b90d703507464e.tar.gz
*: --help tweaks
function old new delta .rodata 103190 103189 -1 packed_usage 33590 33566 -24 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-25) Total: -25 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'editors/vi.c')
-rw-r--r--editors/vi.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/editors/vi.c b/editors/vi.c
index d85cdd9..beccef4 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -181,7 +181,7 @@
//kbuild:lib-$(CONFIG_VI) += vi.o
//usage:#define vi_trivial_usage
-//usage: IF_FEATURE_VI_COLON("[-c CMD] ")IF_FEATURE_VI_READONLY("[-R] ")"[FILE]..."
+//usage: IF_FEATURE_VI_COLON("[-c CMD] ")IF_FEATURE_VI_READONLY("[-R] ")"[-H] [FILE]..."
//usage:#define vi_full_usage "\n\n"
//usage: "Edit FILE\n"
//usage: IF_FEATURE_VI_COLON(
@@ -191,6 +191,7 @@
//usage: "\n -R Read-only"
//usage: )
//usage: "\n -H List available features"
+// note: non-standard, "vim -H" is Hebrew mode (bidi support)
#include "libbb.h"
// Should be after libbb.h: on some systems regex.h needs sys/types.h:
@@ -4748,7 +4749,11 @@ int vi_main(int argc, char **argv)
initial_cmds[0] = xstrndup(p, MAX_INPUT_LEN);
}
#endif
- while ((c = getopt(argc, argv, "hCRH" IF_FEATURE_VI_COLON("c:"))) != -1) {
+ while ((c = getopt(argc, argv,
+#if ENABLE_FEATURE_VI_CRASHME
+ "C"
+#endif
+ "RHh" IF_FEATURE_VI_COLON("c:"))) != -1) {
switch (c) {
#if ENABLE_FEATURE_VI_CRASHME
case 'C':