1 ; Copyright 2022 Frank Duncan (frank@consxy.com) under AGPL3. See distributed LICENSE.txt.
2 (in-package #:clnl-extension-cli)
4 (defmethod clnl-extensions:prims ((extension (eql :cli)))
6 (list :name :q :type :command :func #'shut-down)
7 (list :name :load :type :command :args '(t) :func #'load-file)
8 (list :name :help :type :command :args '((:token :optional)) :precedence 20 :func #'help)
10 :name :button :type :command :args '(:string (:number :optional))
11 :precedence 20 :func #'clnl-model:execute-button)))
14 (sb-ext:exit :abort t))
16 (defun load-file (file)
19 (defun help (&optional token)
22 "Placeholder help facility, try <:help :q> or <:help :load> for information about the commands we accept"
24 (:|:Q| ":q quits out of clnl")
27 ":load <filename> loads up a model into the current clnl instance."
28 " Try :load \"Wolf Sheep Predation.nlogo\""))
29 (t (format nil "Don't have help for ~S" token))))))