From 5d1e21d28a93415b66401d27a30ee8eb6b2b66a8 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Fri, 29 Oct 2021 16:21:35 -0700 Subject: checkin --- sys/cmd/rc/prompt.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sys/cmd/rc/prompt.c') diff --git a/sys/cmd/rc/prompt.c b/sys/cmd/rc/prompt.c index 6a32d59..ebda9fb 100644 --- a/sys/cmd/rc/prompt.c +++ b/sys/cmd/rc/prompt.c @@ -1,11 +1,12 @@ #include "rc.h" -static char promptbuf[7] = {'>', ' ', 0, ' ' , ' ', ' ', 0}; +/* static char promptbuf[7] = {'>', ' ', 0, ' ' , ' ', ' ', 0}; */ +static char *base= "\x1b[1;31m" ">" "\x1b[0;0m" " ", *promptstr; void resetprompt(void) { - promptbuf[2] = 0; + promptstr = base; } int @@ -14,13 +15,13 @@ prompt(ushort *flag) int f = *flag; if(f){ - if(!readline(promptbuf)){ + if(!readline(promptstr)){ runner->flag.eof = 1; return 0; } write(mapfd(0), "\n\r", 2); - promptbuf[2] = ' '; + promptstr = " "; runner->line++; *flag = 0; -- cgit v1.2.1