mirror of
https://github.com/atuinsh/atuin.git
synced 2024-12-26 00:50:22 +01:00
fix(fish): improve output for enter_accept
(#1341)
Fixes 2 issues with the fish shell prompt when using `enter_accept` 1. Runs pre/post exec so the command is added to the atuin history. 2. Adds padding so that the repainting of the shell prompt doesn't overwrite the output. This adds 2 lines of padding to account for prompts up to 2 lines tall, larger prompts will still cause repainting problems and smaller prompts will be getting an extra line.
This commit is contained in:
parent
4096bb8d17
commit
a57baffa91
@ -24,7 +24,13 @@ function _atuin_search
|
||||
if string match -qg '__atuin_accept__:*' "$h"
|
||||
set hist (string match -r '__atuin_accept__:(.*|\s*)' "$h" | awk 'NR == 2')
|
||||
echo $hist
|
||||
# Need to run the pre/post exec functions manually
|
||||
_atuin_preexec $hist
|
||||
eval $hist
|
||||
_atuin_postexec
|
||||
# Allow space for repainting the prompt, this will work for prompts up to 2 lines
|
||||
echo
|
||||
echo
|
||||
else
|
||||
commandline -r "$h"
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user