summaryrefslogtreecommitdiffstats
path: root/usr.bin/less/main.c
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2018-03-17 14:03:36 +0000
committerkrw <krw@openbsd.org>2018-03-17 14:03:36 +0000
commit745ece38b867f16ee9cc677db6647746fbe499de (patch)
tree4df8e31ad30ff9153aedef695dc896d96b55d56c /usr.bin/less/main.c
parentAdd proper suspend/resume support. (diff)
downloadwireguard-openbsd-745ece38b867f16ee9cc677db6647746fbe499de.tar.xz
wireguard-openbsd-745ece38b867f16ee9cc677db6647746fbe499de.zip
Split only LESS on $.
As guenther@ said "STOP SPLITTING ANYTHING BUT $LESS ON '$' !". anton@ came up with the same diff. ok nicm@
Diffstat (limited to 'usr.bin/less/main.c')
-rw-r--r--usr.bin/less/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/less/main.c b/usr.bin/less/main.c
index 6a06cd0679c..5fc7f131803 100644
--- a/usr.bin/less/main.c
+++ b/usr.bin/less/main.c
@@ -143,7 +143,7 @@ main(int argc, char *argv[])
s = lgetenv(less_is_more ? "MORE" : "LESS");
if (s != NULL)
- scan_option(estrdup(s));
+ scan_option(estrdup(s), 1);
#define isoptstring(s) (((s)[0] == '-' || (s)[0] == '+') && (s)[1] != '\0')
while (argc > 0 && (isoptstring(*argv) || isoptpending())) {
@@ -151,7 +151,7 @@ main(int argc, char *argv[])
argc--;
if (strcmp(s, "--") == 0)
break;
- scan_option(s);
+ scan_option(s, 0);
}
#undef isoptstring