From b46a00f1856947d66c8f74b9f24f7574133a1663 Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Sat, 6 Aug 2022 09:09:42 -0500 Subject: [fix] saving local state after command finishes --- app/account.lisp | 2 +- app/app.lisp | 8 +++----- app/draft.lisp | 4 ++-- app/modify.lisp | 2 +- app/search.lisp | 2 +- app/util.lisp | 2 +- 6 files changed, 9 insertions(+), 11 deletions(-) (limited to 'app') diff --git a/app/account.lisp b/app/account.lisp index bfb4125..71fd83c 100644 --- a/app/account.lisp +++ b/app/account.lisp @@ -83,7 +83,7 @@ (account/redeem/command))) (defun account/handler (cmd) - (cli:print-usage-and-exit cmd t)) + (cli:print-usage cmd t)) (defun account/command () (cli:make-command diff --git a/app/app.lisp b/app/app.lisp index dff5dcb..2a04c1d 100644 --- a/app/app.lisp +++ b/app/app.lisp @@ -38,7 +38,7 @@ (defun toplevel/handler (cmd) "Prints usage statement and then exits" - (cli:print-usage-and-exit cmd *standard-output*)) + (cli:print-usage cmd *standard-output*)) (defun toplevel/command () "Returns the toplevel command object." @@ -54,8 +54,6 @@ (defun main () (ol::with-local-state - (handler-case - (cli:run (toplevel/command))) - (error (e) - (format t "unhandled error ~e~%" e)))) + (cli:run (toplevel/command)) + (format t "moooooo~%"))) diff --git a/app/draft.lisp b/app/draft.lisp index 94489a0..b8cb0e6 100644 --- a/app/draft.lisp +++ b/app/draft.lisp @@ -36,7 +36,7 @@ :usage " [ARG ...]" :description "runs a draft oneliner, same options as `ol run`" :options (run/options) - :handler #'draft/new/handler)) + :handler #'draft/test/handler)) (defhandler draft/edit/handler (name) (ol:edit-item name t)) @@ -78,7 +78,7 @@ (draft/list/command))) (defun draft/handler (cmd) - (cli:print-usage-and-exit cmd t)) + (cli:print-usage cmd t)) (defun draft/command () (cli:make-command diff --git a/app/modify.lisp b/app/modify.lisp index 0b02371..5ad9655 100644 --- a/app/modify.lisp +++ b/app/modify.lisp @@ -79,7 +79,7 @@ (modify/delete/command))) (defun modify/handler (cmd) - (cli:print-usage-and-exit cmd t)) + (cli:print-usage cmd t)) (defun modify/command () (cli:make-command diff --git a/app/search.lisp b/app/search.lisp index afc8f84..df30526 100644 --- a/app/search.lisp +++ b/app/search.lisp @@ -68,7 +68,7 @@ (ol::all-flagged-oneliners limit)) (t - (cli::print-usage-and-exit cmd t))))) + (cli::print-usage cmd t))))) (defparameter +search/examples+ diff --git a/app/util.lisp b/app/util.lisp index 70dee49..6bcf577 100644 --- a/app/util.lisp +++ b/app/util.lisp @@ -35,4 +35,4 @@ command. (destructuring-bind ,args-pattern (clingon:command-arguments *cmd*) ,@body) (error () - (clingon:print-usage-and-exit *cmd* t))))))) + (clingon:print-usage *cmd* t))))))) -- cgit v1.2.3