From fc55695743a15e8e3945b2e5718763378a5ae362 Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Mon, 28 Feb 2022 14:54:59 -0600 Subject: added --timeout --- build-app.lisp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'build-app.lisp') diff --git a/build-app.lisp b/build-app.lisp index f387116..7da683b 100644 --- a/build-app.lisp +++ b/build-app.lisp @@ -50,7 +50,13 @@ my1337pw.") (group (:header "RUNNING ONELINERS") (text :contents "Runs the Nth search result with possible arguments ARGS.") (flag :long-name "clip" - :description "Put oneliner into clipboard instead of running it.")) + :description "Put oneliner into clipboard instead of running it.") + (lispobj :long-name "timeout" + :argument-type :optional + :argument-name "SECONDS" + :default-value 1.0 + :typespec 'float + :description "How long to wait for output before giving up.")) (text :contents " ") (group (:header "Help") (flag :long-name "explain" @@ -158,7 +164,9 @@ than the users." ;; (cli::make-alias-for-item hist-number (second arguments))) (t - (cli::run-item hist-number (rest arguments) (getopt :long-name "clip")))) + (cli::run-item hist-number (rest arguments) + :force-clip (getopt :long-name "clip") + :timeout (getopt :long-name "timeout")))) (uiop:quit)) ;; otherwise search for oneliners (cli::search-for-oneliners arguments -- cgit v1.2.3