diff options
author | delphij <delphij@FreeBSD.org> | 2007-06-21 10:39:24 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2007-06-21 10:39:24 +0000 |
commit | c42a76d47fee6466cac768757f65afe30dd6eb89 (patch) | |
tree | 433d9017ada96e11fc7984d39f5fcd259da8a269 /contrib | |
parent | 84d4dbb618d1bcabae2a9014accb0d7f5fe80a39 (diff) | |
download | FreeBSD-src-c42a76d47fee6466cac768757f65afe30dd6eb89.zip FreeBSD-src-c42a76d47fee6466cac768757f65afe30dd6eb89.tar.gz |
Restore a historical behavior that +foo is considered as a
filename by more(1). The less(1) behavior is keep intact.
PR: bin/51488
Prodded by: demon
Approved by: re (hrs)
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/less/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/less/main.c b/contrib/less/main.c index 6d0a022..84b58b9 100644 --- a/contrib/less/main.c +++ b/contrib/less/main.c @@ -142,7 +142,8 @@ main(argc, argv) if (s != NULL) scan_option(save(s)); -#define isoptstring(s) (((s)[0] == '-' || (s)[0] == '+') && (s)[1] != '\0') +#define isoptstring(s) less_is_more ? (((s)[0] == '-') && (s)[1] != '\0') : \ + (((s)[0] == '-' || (s)[0] == '+') && (s)[1] != '\0') while (argc > 0 && (isoptstring(*argv) || isoptpending())) { s = *argv++; |