diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2014-01-22 16:36:22 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2014-01-22 16:36:22 +0100 |
commit | 821e64316a93d2760ad60c326e1a59aabc3e6441 (patch) | |
tree | 4d52f0213bf8eec56187f043b795c392aa2d85ca /miscutils/less.c | |
parent | ff6506131152ee383685047c19bc420ed4de030e (diff) | |
download | busybox-w32-821e64316a93d2760ad60c326e1a59aabc3e6441.tar.gz busybox-w32-821e64316a93d2760ad60c326e1a59aabc3e6441.tar.bz2 busybox-w32-821e64316a93d2760ad60c326e1a59aabc3e6441.zip |
less: accept and ignore -s
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils/less.c')
-rw-r--r-- | miscutils/less.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/miscutils/less.c b/miscutils/less.c index 60105f42b..574f222e0 100644 --- a/miscutils/less.c +++ b/miscutils/less.c | |||
@@ -98,16 +98,18 @@ | |||
98 | //config: Enables "-N" command. | 98 | //config: Enables "-N" command. |
99 | 99 | ||
100 | //usage:#define less_trivial_usage | 100 | //usage:#define less_trivial_usage |
101 | //usage: "[-E" IF_FEATURE_LESS_FLAGS("Mm") "Nh~I?] [FILE]..." | 101 | //usage: "[-E" IF_FEATURE_LESS_REGEXP("I")IF_FEATURE_LESS_FLAGS("Mm") "Nh~] [FILE]..." |
102 | //usage:#define less_full_usage "\n\n" | 102 | //usage:#define less_full_usage "\n\n" |
103 | //usage: "View FILE (or stdin) one screenful at a time\n" | 103 | //usage: "View FILE (or stdin) one screenful at a time\n" |
104 | //usage: "\n -E Quit once the end of a file is reached" | 104 | //usage: "\n -E Quit once the end of a file is reached" |
105 | //usage: IF_FEATURE_LESS_REGEXP( | ||
106 | //usage: "\n -I Ignore case in all searches" | ||
107 | //usage: ) | ||
105 | //usage: IF_FEATURE_LESS_FLAGS( | 108 | //usage: IF_FEATURE_LESS_FLAGS( |
106 | //usage: "\n -M,-m Display status line with line numbers" | 109 | //usage: "\n -M,-m Display status line with line numbers" |
107 | //usage: "\n and percentage through the file" | 110 | //usage: "\n and percentage through the file" |
108 | //usage: ) | 111 | //usage: ) |
109 | //usage: "\n -N Prefix line number to each line" | 112 | //usage: "\n -N Prefix line number to each line" |
110 | //usage: "\n -I Ignore case in all searches" | ||
111 | //usage: "\n -~ Suppress ~s displayed past EOF" | 113 | //usage: "\n -~ Suppress ~s displayed past EOF" |
112 | 114 | ||
113 | #include <sched.h> /* sched_yield() */ | 115 | #include <sched.h> /* sched_yield() */ |
@@ -1613,10 +1615,13 @@ int less_main(int argc, char **argv) | |||
1613 | 1615 | ||
1614 | INIT_G(); | 1616 | INIT_G(); |
1615 | 1617 | ||
1616 | /* TODO: -x: do not interpret backspace, -xx: tab also */ | 1618 | /* TODO: -x: do not interpret backspace, -xx: tab also |
1617 | /* -xxx: newline also */ | 1619 | * -xxx: newline also |
1618 | /* -w N: assume width N (-xxx -w 32: hex viewer of sorts) */ | 1620 | * -w N: assume width N (-xxx -w 32: hex viewer of sorts) |
1619 | getopt32(argv, "EMmN~I" IF_FEATURE_LESS_DASHCMD("S")); | 1621 | * -s: condense many empty lines to one |
1622 | * (used by some setups for manpage display) | ||
1623 | */ | ||
1624 | getopt32(argv, "EMmN~I" IF_FEATURE_LESS_DASHCMD("S") /*ignored:*/"s"); | ||
1620 | argc -= optind; | 1625 | argc -= optind; |
1621 | argv += optind; | 1626 | argv += optind; |
1622 | num_files = argc; | 1627 | num_files = argc; |