From f597d7c730e71db1337980de2870f2d5dd493407 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Harald=20J=C3=B8rgensen?= <58829763+adamjoer@users.noreply.github.com> Date: Tue, 24 Oct 2023 15:53:57 +0200 Subject: [PATCH] Shell: Add command to history before running, instead of after --- Userland/Shell/Shell.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Shell/Shell.cpp b/Userland/Shell/Shell.cpp index 9fce571e9d..5b74f7ff75 100644 --- a/Userland/Shell/Shell.cpp +++ b/Userland/Shell/Shell.cpp @@ -2133,11 +2133,11 @@ bool Shell::read_single_line() if (line.is_empty()) return true; - run_command(line); - if (!has_history_event(line)) m_editor->add_to_history(line); + run_command(line); + return true; } }