all repos — pls @ 9f320dbcf8b35dfc2d92fca4a25c9019de2ed69a

A polite but determined task runner.

Added support to select multiple targets.
h3rald h3rald@h3rald.com
Mon, 11 Oct 2021 07:57:16 +0200
commit

9f320dbcf8b35dfc2d92fca4a25c9019de2ed69a

parent

b644c585c3e8a44d02a71f14c6cebed234b3b83a

1 files changed, 9 insertions(+), 8 deletions(-)

jump to
M src/pls.nimsrc/pls.nim

@@ -16,9 +16,9 @@ let USAGE* = """$1 v$2 - $3

(c) 2021 $4 Usage: - pls <action> [<thing>] Executes <action> (on <thing>). - <thing> can contain a start and/or leading * to perform - simple searches. + pls <action> [<thing>, <thing2>, ...] Executes <action> (on <thing>). + <thing> can contain a start and/or leading * + to perform simple searches. Options: --help, -h Displays this message.

@@ -281,8 +281,9 @@ elif ARGS.len < 2:

for key in DATA["things"].keys: execute(ARGS[0], key) else: - for thing in filterItems("things", ARGS[1]): - try: - execute(ARGS[0], thing) - except: - echo "(!) " & getCurrentExceptionMsg() + for arg in ARGS[1..ARGS.len-1]: + for thing in filterItems("things", arg): + try: + execute(ARGS[0], thing) + except: + echo "(!) " & getCurrentExceptionMsg()