scroll with carriage return and back to $PAGER - clic - Clic is an command line interactive client for gopher written in Common LISP
HTML git clone git://bitreich.org/clic/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/clic/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
DIR LICENSE
---
DIR commit e44d7e9bf83b9f4f33612a9aa178cb05625c41a4
DIR parent 8082edf6c70c5873c19f92730e8e0db5bceb1dee
HTML Author: Solene Rapenne <solene@perso.pw>
Date: Fri, 12 Jan 2018 09:39:09 +0100
scroll with carriage return and back to $PAGER
Diffstat:
M clic.lisp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
DIR diff --git a/clic.lisp b/clic.lisp
@@ -493,7 +493,7 @@
(loop for line across *buffer*
do
(format output "~a~%" line)))
- (uiop:run-program (list (or (uiop:getenv "EDITOR") "less") path)
+ (uiop:run-program (list (or (uiop:getenv "PAGER") "less") path)
:input :interactive
:output :interactive))
;; display last menu
@@ -549,7 +549,7 @@
(force-output)
(let ((first-input (read-char)))
(if (char= #\NewLine first-input)
- (format t "'~a[A~a[K" #\Escape #\Escape)
+ (format t "'~C[A~C[K~C" #\Escape #\Escape #\return)
(progn
(unread-char first-input)
(let ((input-text (format nil "~a" (read-line nil nil))))