From b85cb770d3e219e183cec68ed29d76d143599098 Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Sat, 13 Feb 2021 22:24:23 +0000 Subject: [PATCH] Update widget --- atuin.plugin.zsh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/atuin.plugin.zsh b/atuin.plugin.zsh index e6d4ef2..50b6e13 100644 --- a/atuin.plugin.zsh +++ b/atuin.plugin.zsh @@ -16,7 +16,16 @@ _atuin_precmd(){ } _atuin_search(){ - $(atuin history list --distinct | $ATUIN_FUZZY) + emulate -L zsh + zle -I + + output=$(atuin history list --distinct | $ATUIN_FUZZY) + + if [[ -n $output ]] ; then + LBUFFER=$output + fi + + zle reset-prompt } add-zsh-hook preexec _atuin_preexec