diff options
Diffstat (limited to 'sys/cmd/rc/prompt.c')
-rw-r--r-- | sys/cmd/rc/prompt.c | 9 |
1 files changed, 5 insertions, 4 deletions
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; |