From f116178dcf8b450c76400e2a0fbd2991f2c227b4 Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Fri, 5 Aug 2022 08:58:35 -0500 Subject: [wip] [refactor] [add] subcommands. --- app/clip.lisp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 app/clip.lisp (limited to 'app/clip.lisp') diff --git a/app/clip.lisp b/app/clip.lisp new file mode 100644 index 0000000..922cacc --- /dev/null +++ b/app/clip.lisp @@ -0,0 +1,17 @@ +;;;; clip.lisp + +(in-package :oneliners.cli.app) + +(defun clip/handler (cmd) + (a:if-let (args (cli:command-arguments cmd)) + (ol::run-item + (parse-identifier (first args)) (rest args) + :force-clip t) + (cli:print-usage-and-exit cmd t))) + +(defun clip/command () + (cli:make-command + :name "clip" + :usage " [ARG ...]" + :description "attempt to copy the oneliner to the clipboard" + :handler #'clip/handler)) -- cgit v1.2.3