Allow new lines in prompts
This commit is contained in:
parent
02e6d9cecb
commit
56b82480a4
1 changed files with 11 additions and 1 deletions
|
|
@ -715,7 +715,17 @@ prompt_fmt(char *prompt,
|
|||
cprintf(cb, "%%");
|
||||
cprintf(cb, "%c", *s);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (*s == '\\' && *++s) {
|
||||
switch(*s) {
|
||||
case 'n':
|
||||
cprintf(cb, "\n");
|
||||
break;
|
||||
default:
|
||||
cprintf(cb, "\\");
|
||||
cprintf(cb, "%c", *s);
|
||||
}
|
||||
}
|
||||
else
|
||||
cprintf(cb, "%c", *s);
|
||||
s++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue