From 9a15d9792f3cd21ede6088b98387b0ee2cf2f107 Mon Sep 17 00:00:00 2001 From: Josh Skidmore Date: Wed, 19 Aug 2020 07:32:18 -0400 Subject: [PATCH] properly handle zle widget --- zsh-fzf-history-search.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zsh-fzf-history-search.zsh b/zsh-fzf-history-search.zsh index 1e6ecde..3e662b1 100644 --- a/zsh-fzf-history-search.zsh +++ b/zsh-fzf-history-search.zsh @@ -1,5 +1,6 @@ fzf_history_seach() { - history -t '%Y-%m-%d %H:%M:%S' 0 | grep -v 1969 | fzf +s +m -x --tac -e | awk '{print substr($0, index($0, $4))}' | tr -d "\n" + BUFFER=$(history -t '%Y-%m-%d %H:%M:%S' 0 | grep -v 1969 | fzf +s +m -x --tac -e | awk '{print substr($0, index($0, $4))}') + zle end-of-line } autoload fzf_history_seach