aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorColin Okay <colin@cicadas.surf>2022-08-06 09:09:42 -0500
committerColin Okay <colin@cicadas.surf>2022-08-06 09:09:42 -0500
commitb46a00f1856947d66c8f74b9f24f7574133a1663 (patch)
treeee1bdf510b7bbeae9270702f7fd75f2d093b8782 /app
parent575695b5f1f204aa670b996e791822f36f47ee1d (diff)
[fix] saving local state after command finishes
Diffstat (limited to 'app')
-rw-r--r--app/account.lisp2
-rw-r--r--app/app.lisp8
-rw-r--r--app/draft.lisp4
-rw-r--r--app/modify.lisp2
-rw-r--r--app/search.lisp2
-rw-r--r--app/util.lisp2
6 files changed, 9 insertions, 11 deletions
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 "<DRAFT> [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)))))))