diff options
author | bptato <nincsnevem662@gmail.com> | 2024-03-09 15:23:54 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-03-11 17:05:27 +0100 |
commit | 5572c468582f9f4796b274e98c738dee51c30e90 (patch) | |
tree | 83f84b846dae4a93946acda7afd271736a87e5c4 /adapter | |
parent | 9b69d02409737768caeb3b305f0217c138fd1ec2 (diff) | |
download | chawan-5572c468582f9f4796b274e98c738dee51c30e90.tar.gz |
mancha: fix query for 7z
Diffstat (limited to 'adapter')
-rw-r--r-- | adapter/tools/mancha.nim | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/adapter/tools/mancha.nim b/adapter/tools/mancha.nim index 2e09b51f..2c4c7c34 100644 --- a/adapter/tools/mancha.nim +++ b/adapter/tools/mancha.nim @@ -29,6 +29,7 @@ proc main() = var local = "" var man = "" var keyword = "" + var forceSection = false while i <= n: let s = paramStr(i) if s == "": @@ -42,7 +43,9 @@ proc main() = case s[1] of 'h': help(0) of 'M': putEnv("MANPATH", getnext()) - of 's': section = getnext() + of 's': + section = getnext() + forceSection = true of 'l': local = getnext() of 'k': keyword = getnext() else: help(1) @@ -53,6 +56,9 @@ proc main() = else: help(1) inc i + if not forceSection and section != "" and man == "": + man = section + section = "" if not ((local != "") != (man != "") != (keyword != "")): help(1) if local != "" and section != "": |