From 49d35e4d2a67365864a183e12c9860b762b34d43 Mon Sep 17 00:00:00 2001 From: Joey Guerra Date: Thu, 15 Aug 2024 10:33:03 -0500 Subject: [PATCH] fix: having to hit the up arrow key so many times to get to the previous command --- src/adapters/Shell.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/adapters/Shell.mjs b/src/adapters/Shell.mjs index 2ba6ba4a2..ede4c47b9 100644 --- a/src/adapters/Shell.mjs +++ b/src/adapters/Shell.mjs @@ -99,7 +99,7 @@ class Shell extends Adapter { }) const existingHistory = (await fs.promises.readFile(historyPath, 'utf8')).split('\n') - existingHistory.forEach(line => this.#rl.history.push(line)) + existingHistory.reverse().forEach(line => this.#rl.history.push(line)) try { this.#rl.prompt()