From 6b6826f0b87b13c5e83786f045b90d703507464e Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 13 Jun 2021 01:08:48 +0200 Subject: *: --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 --- editors/vi.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'editors/vi.c') 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': -- cgit v1.1