1.1--- a/lisp/lib/cli/prompt.lisp Mon Jun 03 22:08:03 2024 -0400
1.2+++ b/lisp/lib/cli/prompt.lisp Tue Jun 04 18:53:40 2024 -0400
1.3@@ -50,7 +50,7 @@
1.4 (find res collection :test test)
1.5 res))))
1.6
1.7-(defmacro defprompt (var &key (prompt ">") collection default)
1.8+(defmacro defprompt (var &key (prompt ">") collection default input output)
1.9 "Generate a 'prompter' from list or variable VAR and optional
1.10 PROMPT string.
1.11
1.12@@ -69,4 +69,8 @@
1.13 (format nil "~A [~A]: "
1.14 ,prompt
1.15 (or ,default (car (symbol-value ,h))))
1.16- ,collection :history ,h :default ,default)))))
1.17+ ,collection
1.18+ :history ,h
1.19+ :default ,default
1.20+ ,@(when input (list :input input))
1.21+ ,@(when output (list :output output)))))))