From 6b20f891917ec018cbd4fa9cb44985240a16a5df Mon Sep 17 00:00:00 2001 From: Patrick Jackson Date: Sat, 28 Oct 2023 12:57:08 -0600 Subject: [PATCH] fix(enter_accept): clear old cmd snippet (#1350) --- atuin/src/shell/atuin.bash | 2 ++ atuin/src/shell/atuin.fish | 1 + 2 files changed, 3 insertions(+) diff --git a/atuin/src/shell/atuin.bash b/atuin/src/shell/atuin.bash index a0b20061..3c15d396 100644 --- a/atuin/src/shell/atuin.bash +++ b/atuin/src/shell/atuin.bash @@ -29,6 +29,8 @@ __atuin_history() { eval "$HISTORY" _atuin_precmd echo + READLINE_LINE="" + READLINE_POINT=${#READLINE_LINE} else READLINE_LINE=${HISTORY} READLINE_POINT=${#READLINE_LINE} diff --git a/atuin/src/shell/atuin.fish b/atuin/src/shell/atuin.fish index 9f02579e..182a29bc 100644 --- a/atuin/src/shell/atuin.fish +++ b/atuin/src/shell/atuin.fish @@ -31,6 +31,7 @@ function _atuin_search # Allow space for repainting the prompt, this will work for prompts up to 2 lines echo echo + commandline -r "" else commandline -r "$h" end