Allow new lines in prompts

This commit is contained in:
Sylvain Cadilhac 2018-10-26 19:34:04 +02:00 committed by Olof hagsand
parent 02e6d9cecb
commit 56b82480a4

View file

@ -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++;