diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-04-18 16:01:20 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-04-18 16:01:20 +0000 |
commit | 0a01aecfc2a95af2e7c4a4cba60c688fed82d9d4 (patch) | |
tree | 966d1dda1162902a634d02dd2f782262ca820b38 | |
parent | 4df1bc6f95fa256c0355afc2d808ed94c63fe442 (diff) | |
download | mandoc-0a01aecfc2a95af2e7c4a4cba60c688fed82d9d4.tar.gz |
Now that global -i is gone, pass -i through to the apropos(1)
expression parser, such that "apropos -i 'Nm~dump\>'"
finds kdump(1) and WCOREDUMP(2) and you don't need
to type the counter-intuitive "apropos -- -i 'Nm~dump\>'".
-rw-r--r-- | main.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -193,8 +193,12 @@ main(int argc, char *argv[]) show_usage = 0; outmode = OUTMODE_DEF; - while (-1 != (c = getopt(argc, argv, - "aC:cfhI:iK:klM:m:O:S:s:T:VW:w"))) { + while ((c = getopt(argc, argv, + "aC:cfhI:iK:klM:m:O:S:s:T:VW:w")) != -1) { + if (c == 'i' && search.argmode == ARG_EXPR) { + optind--; + break; + } switch (c) { case 'a': outmode = OUTMODE_ALL; |