From f82a9d9b42edad030a1832716cd5c536b178ecf5 Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Tue, 1 Mar 2022 10:28:26 -0600 Subject: longer default timeout; run oneliners by id; clear caches --- build-app.lisp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'build-app.lisp') diff --git a/build-app.lisp b/build-app.lisp index 30eb88a..0a1bfd5 100644 --- a/build-app.lisp +++ b/build-app.lisp @@ -79,14 +79,18 @@ you run the oneliner, all positional variables appear first. (text :contents " ") (group (:header "ONELINER EXECUTION OPTIONS") (text :contents "Runs the Nth search result with possible arguments ARGS.") + (flag :long-name "id" + :description "Runs a oneliner by its id instead of by result number.") (flag :long-name "clip" :description "Put oneliner into clipboard instead of running it.") + (flag :long-name "clear-cache" + :description "Clears all cached search results from your system.") (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. Make longer if you dont see any output.")) + :default-value 2 + :typespec 'integer + :description "How long to wait for standard output before giving up.")) (text :contents " ") (group (:header "HELP OPTIONS") (flag :long-name "explain" @@ -191,6 +195,9 @@ than the users." ((getopt :long-name "newest") (cli::newest-oneliners (getopt :long-name "limit"))) + ((getopt :long-name "clear-cache") + (cli::wipe-cache)) + (arguments ;; when the first argument is a number, try run a oneliner (a:when-let (hist-number (parse-integer (first arguments) :junk-allowed t)) @@ -213,6 +220,7 @@ than the users." (t (cli::run-item hist-number (rest arguments) + :by-id (getopt :long-name "id") :force-clip (getopt :long-name "clip") :timeout (getopt :long-name "timeout")))) (uiop:quit)) -- cgit v1.2.3