diff options
author | 2017-04-18 15:59:56 +0000 | |
---|---|---|
committer | 2017-04-18 15:59:56 +0000 | |
commit | 7d0afed87ebe2305799b98964aa700fe1d9d8bab (patch) | |
tree | e93661c28421ebb4eae3c93dbf6188e1b6a6edd5 | |
parent | don't forget to fill in canary bytes for posix_memalign(3); reported by (diff) | |
download | wireguard-openbsd-7d0afed87ebe2305799b98964aa700fe1d9d8bab.tar.xz wireguard-openbsd-7d0afed87ebe2305799b98964aa700fe1d9d8bab.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\>'".
-rw-r--r-- | usr.bin/mandoc/main.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/mandoc/main.c b/usr.bin/mandoc/main.c index ee1d3bdc82f..50071caf5ef 100644 --- a/usr.bin/mandoc/main.c +++ b/usr.bin/mandoc/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.191 2017/04/18 15:26:33 schwarze Exp $ */ +/* $OpenBSD: main.c,v 1.192 2017/04/18 15:59:56 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2012, 2014-2017 Ingo Schwarze <schwarze@openbsd.org> @@ -169,8 +169,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; |