(asdf:load-system "oneliners.cli") (defpackage #:oneliners.cli.app (:use #:cl #:net.didierverna.clon)) (in-package :oneliners.cli.app) (defsynopsis (:postfix "TERMS ... | N ARGS ...") (text :contents "This is some arbitrary text.") (group (:header "Search") (lispobj :long-name "count" :short-name "n" :argument-type :optional :default-value 10 :typespec 'integer) (flag :long-name "not-flagged" :description "Request that no flagged oneliners are returned.")) (group () (flag :long-name "help" :short-name "h" :description "print this help menu."))) (defun main () "Entry point for our standalone application." (make-context) (when (getopt :short-name "h") (help) (uiop:quit)) (let ((arguments (remainder))) (unless arguments (help) (uiop:quit)) (alexandria:when-let (hist-number (parse-integer (first arguments) :junk-allowed t)) (format t "TBD: Going to run command ~a with arguments ~a~%" hist-number (rest arguments)) (uiop:quit)) (format t "TBD: Going to search for commands mentioning the terms ~a~%" arguments)) (uiop:quit)) (dump "ol" main)