tb Print colorful shell prompt and logged cmds, print terminal W/H

This commit is contained in:
2025-11-15 00:58:40 +01:00
parent 7da422fdb6
commit af27592957
2 changed files with 6 additions and 2 deletions

View File

@ -78,11 +78,15 @@ done:
}
void do_mode_interactive(void) {
uint16_t w, h;
term_getsizes(&w, &h);
uprintf("TERMINAL: %ux%u\n", (uint32_t)w, (uint32_t)h);
char linebuf[LINEBUF_MAX];
size_t cursor;
for(;;) {
begin:
uprintf("tb# ");
uprintf("["ANSIQ_SETFG_RGB(0, 163, 255)"TB"ANSIQ_GR_RESET"]# ");
cursor = 0;
string_memset(linebuf, 0, LINEBUF_MAX);