summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko2014-01-22 16:36:22 +0100
committerDenys Vlasenko2014-01-22 16:36:22 +0100
commit821e64316a93d2760ad60c326e1a59aabc3e6441 (patch)
tree4d52f0213bf8eec56187f043b795c392aa2d85ca
parentff6506131152ee383685047c19bc420ed4de030e (diff)
downloadbusybox-821e64316a93d2760ad60c326e1a59aabc3e6441.zip
busybox-821e64316a93d2760ad60c326e1a59aabc3e6441.tar.gz
less: accept and ignore -s
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--miscutils/less.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/miscutils/less.c b/miscutils/less.c
index 60105f4..574f222 100644
--- a/miscutils/less.c
+++ b/miscutils/less.c
@@ -98,16 +98,18 @@
//config: Enables "-N" command.
//usage:#define less_trivial_usage
-//usage: "[-E" IF_FEATURE_LESS_FLAGS("Mm") "Nh~I?] [FILE]..."
+//usage: "[-E" IF_FEATURE_LESS_REGEXP("I")IF_FEATURE_LESS_FLAGS("Mm") "Nh~] [FILE]..."
//usage:#define less_full_usage "\n\n"
//usage: "View FILE (or stdin) one screenful at a time\n"
//usage: "\n -E Quit once the end of a file is reached"
+//usage: IF_FEATURE_LESS_REGEXP(
+//usage: "\n -I Ignore case in all searches"
+//usage: )
//usage: IF_FEATURE_LESS_FLAGS(
//usage: "\n -M,-m Display status line with line numbers"
//usage: "\n and percentage through the file"
//usage: )
//usage: "\n -N Prefix line number to each line"
-//usage: "\n -I Ignore case in all searches"
//usage: "\n -~ Suppress ~s displayed past EOF"
#include <sched.h> /* sched_yield() */
@@ -1613,10 +1615,13 @@ int less_main(int argc, char **argv)
INIT_G();
- /* TODO: -x: do not interpret backspace, -xx: tab also */
- /* -xxx: newline also */
- /* -w N: assume width N (-xxx -w 32: hex viewer of sorts) */
- getopt32(argv, "EMmN~I" IF_FEATURE_LESS_DASHCMD("S"));
+ /* TODO: -x: do not interpret backspace, -xx: tab also
+ * -xxx: newline also
+ * -w N: assume width N (-xxx -w 32: hex viewer of sorts)
+ * -s: condense many empty lines to one
+ * (used by some setups for manpage display)
+ */
+ getopt32(argv, "EMmN~I" IF_FEATURE_LESS_DASHCMD("S") /*ignored:*/"s");
argc -= optind;
argv += optind;
num_files = argc;