summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/main.c b/main.c
index 6fc3d4ad..696c556f 100644
--- a/main.c
+++ b/main.c
@@ -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;