Coverage report: /home/ellis/comp/core/lib/cli/tui.lisp
Kind | Covered | All | % |
expression | 0 | 31 | 0.0 |
branch | 0 | 4 | 0.0 |
Key
Not instrumented
Conditionalized out
Executed
Not executed
Both branches taken
One branch taken
Neither branch taken
1
;;; tui.lisp --- Terminal User Interface
3
;; Utilities for building Terminal UIs.
7
;; This package provides
12
(defvar *prompt2* "> ")
14
(defun completing-read (prompt completions &optional default)
15
"Print PROMPT then read input using linedit with completions. DEFAULT is the
16
value returned when the input doesn't match a member of COMPLETIONS. A default
17
value of :ERROR indicates that an error will be signaled when input doesn't
19
(let ((val (linedit:formedit :prompt1 prompt :prompt2 *prompt2* :completions completions)))
21
(if (member val completions :test 'equal)
23
(if (eql default :error)
24
(error 'invalid-argument :reason (format nil "input must match one of: ~S" completions) :item val)
28
;; (defmacro defprompt (name ))