diff options
author | 2017-04-18 16:01:20 +0000 | |
---|---|---|
committer | 2017-04-18 16:01:20 +0000 | |
commit | 50c21bf04a5555959f2d160928ffd6136da05d7a (patch) | |
tree | 18a5f927d09c9d82a5921231813feb32d2215bc4 /main.c | |
parent | a1a544ae6cc46457ab2bdb84b0c9a8b0a3f8828b (diff) | |
download | mandoc-50c21bf04a5555959f2d160928ffd6136da05d7a.tar.gz mandoc-50c21bf04a5555959f2d160928ffd6136da05d7a.tar.zst mandoc-50c21bf04a5555959f2d160928ffd6136da05d7a.zip |
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\>'".
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.288 2017/04/18 15:27:09 schwarze Exp $ */ +/* $Id: main.c,v 1.289 2017/04/18 16:01:20 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2012, 2014-2017 Ingo Schwarze <schwarze@openbsd.org> @@ -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; |