summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Jackson <patrick@jackson.dev>2023-10-28 12:57:08 -0600
committerGitHub <noreply@github.com>2023-10-28 19:57:08 +0100
commit6b20f891917ec018cbd4fa9cb44985240a16a5df (patch)
tree743e99e32b788e1845173c37874b0ea1a3d88343
parent206677878039fafeb2b7ee9847ef0c8632db91d0 (diff)
fix(enter_accept): clear old cmd snippet (#1350)
-rw-r--r--atuin/src/shell/atuin.bash2
-rw-r--r--atuin/src/shell/atuin.fish1
2 files changed, 3 insertions, 0 deletions
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