remove prompt coloring to allow readline to determine proper length
This commit is contained in:
parent
1837431f0c
commit
d53f1055f3
|
@ -145,7 +145,6 @@ copyleft.
|
||||||
|
|
||||||
|
|
||||||
(define (builtin ast)
|
(define (builtin ast)
|
||||||
;;(format (current-error-port) "builtin: ~s\n" ast)
|
|
||||||
(match ast
|
(match ast
|
||||||
(('append ('glob "cd") arg) `(apply chdir ,arg))
|
(('append ('glob "cd") arg) `(apply chdir ,arg))
|
||||||
(('append ('glob "fg") ('glob arg)) `(fg ,(string->number arg)))
|
(('append ('glob "fg") ('glob arg)) `(fg ,(string->number arg)))
|
||||||
|
@ -208,6 +207,7 @@ copyleft.
|
||||||
('script #t) ;; skip
|
('script #t) ;; skip
|
||||||
(_ (begin (map exec ast) #t)))))
|
(_ (begin (map exec ast) #t)))))
|
||||||
|
|
||||||
|
;;TODO add colors
|
||||||
|
|
||||||
(define (prompt)
|
(define (prompt)
|
||||||
(let* ((esc (string #\033))
|
(let* ((esc (string #\033))
|
||||||
|
@ -217,7 +217,7 @@ copyleft.
|
||||||
(string-replace CWD "~" 0 (string-length HOME))
|
(string-replace CWD "~" 0 (string-length HOME))
|
||||||
CWD)))
|
CWD)))
|
||||||
(report-jobs)
|
(report-jobs)
|
||||||
(string-append esc "[01;34m" cwd esc "[00m$ ")))
|
(string-append cwd "$ ")))
|
||||||
|
|
||||||
(define (redraw-current-line)
|
(define (redraw-current-line)
|
||||||
(dynamic-call (dynamic-func "rl_refresh_line"
|
(dynamic-call (dynamic-func "rl_refresh_line"
|
||||||
|
|
Loading…
Reference in New Issue