~kingcons/rascal

4aa5f24a84179156c38a483c2898759918a27971 — Brit Butler 1 year, 1 month ago d4cde86
Fix tests and duplicate version message.
1 files changed, 7 insertions(+), 6 deletions(-)

M src/shell.lisp
M src/shell.lisp => src/shell.lisp +7 -6
@@ 2,11 2,11 @@
  (:use :cl :alexandria :mgl-pax)
  (:import-from :clingon
                #:command-arguments
                #:exit
                #:getopt
                #:make-option
                #:make-command
                #:print-usage-and-exit
                #:print-version-and-exit))
                #:print-usage-and-exit))

(in-package :rascal.shell)



@@ 36,14 36,16 @@ Rascal is powered under the hood by [clingon][clingon]."
                :handler #'help/handler))

(defun version/handler (command)
  (print-version-and-exit command t))
  (declare (ignore command))
  (let ((version (asdf:system-version (asdf:find-system :rascal))))
    (format t "rascal version ~A~%" version)
    (exit)))

(defun version/command ()
  (make-command :name "version"
                :description "Display the installed rascal version"
                :options *no-options*
                :handler #'version/handler
                :version (asdf:system-version (asdf:find-system :rascal))))
                :handler #'version/handler))

(defun toplevel/handler (command)
  (let ((args (command-arguments command)))


@@ 57,7 59,6 @@ Rascal is powered under the hood by [clingon][clingon]."
                           (version/command))))
    (make-command :name "rascal"
                  :description "Radically Simple Compiler for a Lisp"
                  :version (asdf:system-version (asdf:find-system :rascal))
                  :authors '("Brit Butler")
                  :license "MIT"
                  :options *no-options*