diff options
-rw-r--r-- | app/util.lisp | 3 | ||||
-rw-r--r-- | build-app.lisp | 24 | ||||
-rw-r--r-- | lib/client.lisp | 8 |
3 files changed, 9 insertions, 26 deletions
diff --git a/app/util.lisp b/app/util.lisp index 6bcf577..b657e51 100644 --- a/app/util.lisp +++ b/app/util.lisp @@ -34,5 +34,6 @@ command. (handler-case (destructuring-bind ,args-pattern (clingon:command-arguments *cmd*) ,@body) - (error () + (#+sbcl sb-kernel::arg-count-error + #+ccl ccl::simple-program-error (e) (clingon:print-usage *cmd* t))))))) diff --git a/build-app.lisp b/build-app.lisp deleted file mode 100644 index 2a6abab..0000000 --- a/build-app.lisp +++ /dev/null @@ -1,24 +0,0 @@ -;;; build-app.lisp -- Contains the command line frontend definition -;;; to build the cli, simply load this file from the command line. - -;; Copyright (C) 2022 Colin Okay - -;; This program is free software: you can redistribute it and/or modify -;; it under the terms of the GNU Affero General Public License as -;; published by the Free Software Foundation, either version 3 of the -;; License, or (at your option) any later version. - -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU Affero General Public License for more details. - -;; You should have received a copy of the GNU Affero General Public License -;; along with this program. If not, see <http://www.gnu.org/licenses/>. - - -(asdf:load-system "oneliners.cli/app") -(in-package :oneliners.cli.app) -;;; DUMP EXECUTABLE -(dump "ol" main) ; from clon - diff --git a/lib/client.lisp b/lib/client.lisp index 9f92c6e..680d07b 100644 --- a/lib/client.lisp +++ b/lib/client.lisp @@ -79,7 +79,13 @@ running the body. If such a oneliner can be found." (when-oneliner (ol name-or-number) (print-oneliner-result-for-user ol) (when (oneliner-explanation ol) - (princ #\newline) + (loop repeat (floor (/ *term-width* 3)) do (princ " ")) + (let ((tilde-count + (floor (* 0.5 (- (/ *term-width* 3) (length "NOTES")))))) + (loop repeat tilde-count do (princ "~")) + (princ "NOTES") + (loop repeat tilde-count do (princ "~"))) + (terpri) (princ (oneliner-explanation ol))))) (defun print-drafts () |