From 0bfaf89c9bf36c785b646b43da2ef04b8f460fad Mon Sep 17 00:00:00 2001 From: b1ek Date: Mon, 13 Mar 2023 01:24:44 +1000 Subject: [PATCH] history works like its supposed to --- react/resume/src/emulator/zsh.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/react/resume/src/emulator/zsh.js b/react/resume/src/emulator/zsh.js index 8bb4dc2..4446b09 100644 --- a/react/resume/src/emulator/zsh.js +++ b/react/resume/src/emulator/zsh.js @@ -25,14 +25,14 @@ function pr_char(char) { function exec_cmd() { let c = cmd; reset_cmd(); - history.push(c); + history.unshift(c); terminal.writeln('zsh: command not found: ' + c); print_prompt(); + history_pos = 0; } function print_prompt() { terminal.write(prompt); - history_pos = 0; } function reprint_prompt() {