aboutsummaryrefslogtreecommitdiff
path: root/src/main.nim
diff options
context:
space:
mode:
authorkitsunyan2018-04-19 06:09:44 +0000
committerkitsunyan2018-04-19 06:09:44 +0000
commit38feb86612aa592eda7333f4cae4d868ecc13841 (patch)
treec7d77902b9c3f51e36be32275ba06e2239e24d9d /src/main.nim
parent4bcf8fc92fb7c3258befc71077af0cdf83b8431a (diff)
Add support for abbreviated keys
Diffstat (limited to 'src/main.nim')
-rw-r--r--src/main.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.nim b/src/main.nim
index 467dc48..685b9d3 100644
--- a/src/main.nim
+++ b/src/main.nim
@@ -216,7 +216,8 @@ template withErrorHandler(propColor: Option[bool], T: typedesc, body: untyped):
let init = withErrorHandler(none(bool),
tuple[parsedArgs: seq[Argument], config: Config]):
- let parsedArgs = splitArgs(commandLineParams(), optionsWithParameter)
+ let parsedArgs = splitArgs(commandLineParams(), optionsWithParameter,
+ (operations.map(o => o.pair.long) & allOptions.map(o => o.pair.long)).deduplicate)
let pacmanConfig = obtainPacmanConfig(parsedArgs)
let config = obtainConfig(pacmanConfig)
(parsedArgs, config)