Fix prompt now printing

This commit is contained in:
2025-10-25 19:35:01 -07:00
parent 10c03d9fc0
commit e7c7c0fea1

View File

@ -572,7 +572,8 @@ return a list of many indices instead."
(error "Nothing found..."))
(format stream "~&Select ~:[indices~;index~] to ~A: "
(or (eql 1 max) (not allow-many)) action)
(let ((resp-string (read-line stream nil)))
(finish-output (if (eq stream t) *standard-output* stream))
(let ((resp-string (read-line *standard-input* nil)))
(unless resp-string
(error "No number provided"))
(let ((parts (uiop:split-string resp-string :separator '(#\,)))
@ -592,7 +593,8 @@ return a list of many indices instead."
(when control
(apply #'format stream control args)
(format stream "? (y/n) "))
(let ((resp-string (read-line stream nil)))
(finish-output (if (eq stream t) *standard-output* stream))
(let ((resp-string (read-line *standard-input* nil)))
(when resp-string
(member resp-string '("yes" "y" "1") :test #'equalp))))
@ -751,7 +753,7 @@ return a list of many indices instead."
(append
(clingon-filtering-options)
(clingon-sort-options)
(clingon-format-options "%>#: %t %o\\n" "%>: %p\\n")
(clingon-format-options "%>#: %t %o\\n" "%>#: %p\\n")
(clingon-indices-options "erase")
(list
(clingon:make-option