diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2021-06-13 01:08:48 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2021-06-13 01:08:48 +0200 |
commit | 6b6826f0b87b13c5e83786f045b90d703507464e (patch) | |
tree | dc40238c9843b020fddfa7de83e25892b166dbe4 /editors | |
parent | aece2c5f0fef9088b615016f3177b1abd3a373bb (diff) | |
download | busybox-w32-6b6826f0b87b13c5e83786f045b90d703507464e.tar.gz busybox-w32-6b6826f0b87b13c5e83786f045b90d703507464e.tar.bz2 busybox-w32-6b6826f0b87b13c5e83786f045b90d703507464e.zip |
*: --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')
-rw-r--r-- | editors/sed.c | 2 | ||||
-rw-r--r-- | editors/vi.c | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/editors/sed.c b/editors/sed.c index d3444003e..a6845a979 100644 --- a/editors/sed.c +++ b/editors/sed.c | |||
@@ -70,7 +70,7 @@ | |||
70 | //usage:#define sed_full_usage "\n\n" | 70 | //usage:#define sed_full_usage "\n\n" |
71 | //usage: " -e CMD Add CMD to sed commands to be executed" | 71 | //usage: " -e CMD Add CMD to sed commands to be executed" |
72 | //usage: "\n -f FILE Add FILE contents to sed commands to be executed" | 72 | //usage: "\n -f FILE Add FILE contents to sed commands to be executed" |
73 | //usage: "\n -i[SFX] Edit files in-place (otherwise sends to stdout)" | 73 | //usage: "\n -i[SFX] Edit files in-place (otherwise write to stdout)" |
74 | //usage: "\n Optionally back files up, appending SFX" | 74 | //usage: "\n Optionally back files up, appending SFX" |
75 | //usage: "\n -n Suppress automatic printing of pattern space" | 75 | //usage: "\n -n Suppress automatic printing of pattern space" |
76 | //usage: "\n -r,-E Use extended regex syntax" | 76 | //usage: "\n -r,-E Use extended regex syntax" |
diff --git a/editors/vi.c b/editors/vi.c index d85cdd98d..beccef4b4 100644 --- a/editors/vi.c +++ b/editors/vi.c | |||
@@ -181,7 +181,7 @@ | |||
181 | //kbuild:lib-$(CONFIG_VI) += vi.o | 181 | //kbuild:lib-$(CONFIG_VI) += vi.o |
182 | 182 | ||
183 | //usage:#define vi_trivial_usage | 183 | //usage:#define vi_trivial_usage |
184 | //usage: IF_FEATURE_VI_COLON("[-c CMD] ")IF_FEATURE_VI_READONLY("[-R] ")"[FILE]..." | 184 | //usage: IF_FEATURE_VI_COLON("[-c CMD] ")IF_FEATURE_VI_READONLY("[-R] ")"[-H] [FILE]..." |
185 | //usage:#define vi_full_usage "\n\n" | 185 | //usage:#define vi_full_usage "\n\n" |
186 | //usage: "Edit FILE\n" | 186 | //usage: "Edit FILE\n" |
187 | //usage: IF_FEATURE_VI_COLON( | 187 | //usage: IF_FEATURE_VI_COLON( |
@@ -191,6 +191,7 @@ | |||
191 | //usage: "\n -R Read-only" | 191 | //usage: "\n -R Read-only" |
192 | //usage: ) | 192 | //usage: ) |
193 | //usage: "\n -H List available features" | 193 | //usage: "\n -H List available features" |
194 | // note: non-standard, "vim -H" is Hebrew mode (bidi support) | ||
194 | 195 | ||
195 | #include "libbb.h" | 196 | #include "libbb.h" |
196 | // Should be after libbb.h: on some systems regex.h needs sys/types.h: | 197 | // 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) | |||
4748 | initial_cmds[0] = xstrndup(p, MAX_INPUT_LEN); | 4749 | initial_cmds[0] = xstrndup(p, MAX_INPUT_LEN); |
4749 | } | 4750 | } |
4750 | #endif | 4751 | #endif |
4751 | while ((c = getopt(argc, argv, "hCRH" IF_FEATURE_VI_COLON("c:"))) != -1) { | 4752 | while ((c = getopt(argc, argv, |
4753 | #if ENABLE_FEATURE_VI_CRASHME | ||
4754 | "C" | ||
4755 | #endif | ||
4756 | "RHh" IF_FEATURE_VI_COLON("c:"))) != -1) { | ||
4752 | switch (c) { | 4757 | switch (c) { |
4753 | #if ENABLE_FEATURE_VI_CRASHME | 4758 | #if ENABLE_FEATURE_VI_CRASHME |
4754 | case 'C': | 4759 | case 'C': |