From 38feb86612aa592eda7333f4cae4d868ecc13841 Mon Sep 17 00:00:00 2001 From: kitsunyan Date: Thu, 19 Apr 2018 09:09:44 +0300 Subject: Add support for abbreviated keys --- src/main.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main.nim') 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) -- cgit v1.2.3-70-g09d2