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()