#ifndef NOFIFO
static char *fifopath;
#endif
+static char *lastcmd;
static ullong_t *ihashbmp;
static struct entry *pdents;
static blkcnt_t dir_blocks;
case KEY_HOME:
pos = 0;
break;
+ case KEY_UP: // fallthrough
+ case KEY_DOWN:
+ if (prompt && lastcmd && (xstrcmp(prompt, PROMPT) == 0)) {
+ printmsg(prompt);
+ len = pos = mbstowcs(buf, lastcmd, READLINE_MAX); // fallthrough
+ }
default:
break;
}
tmp = getreadline("\n"PROMPT);
#endif
if (tmp && *tmp) { // NOLINT
+ free(lastcmd);
+ lastcmd = xstrdup(tmp);
ret = TRUE;
spawn(shell, "-c", tmp, NULL, F_CLI | F_CONFIRM);
} else