aboutsummaryrefslogtreecommitdiff
path: root/sys/cmd/rc/prompt.c
diff options
context:
space:
mode:
authorNicholas Noll <nnoll523@gmail.com>2021-10-29 16:21:35 -0700
committerNicholas Noll <nnoll523@gmail.com>2021-10-29 16:21:35 -0700
commit5d1e21d28a93415b66401d27a30ee8eb6b2b66a8 (patch)
tree05915cb47dc9a5208f4b969587b496f831562f94 /sys/cmd/rc/prompt.c
parent6db99f51209ebde97311df3aac081f82589319cb (diff)
checkin
Diffstat (limited to 'sys/cmd/rc/prompt.c')
-rw-r--r--sys/cmd/rc/prompt.c9
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;