diff options
Diffstat (limited to 'app/run.lisp')
-rw-r--r-- | app/run.lisp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/app/run.lisp b/app/run.lisp index 987ecad..556b719 100644 --- a/app/run.lisp +++ b/app/run.lisp @@ -24,14 +24,11 @@ :key :confirm :description "prompts the user for confirmation before running the command"))) -(defun run/handler (cmd) - (a:if-let (args (cli:command-arguments cmd)) - (ol::run-item - (first args) (rest args) - :verbose (cli:getopt cmd :verbose) - :confirm (cli:getopt cmd :confirm) - :timeout (cli:getopt cmd :timeout)) - (cli:print-usage-and-exit cmd t))) +(defhandler run/handler (id . args) + (ol:run-item (parse-identifier id) args + :verbose (cli:getopt *cmd* :verbose) + :confirm (cli:getopt *cmd* :confirm) + :timeout (cli:getopt *cmd* :timeout))) (defparameter +run/examples+ '(("Run a hypothetical command called echo-stuff with positional arguments" . |