From 0564606b88f08c6adab9bc1f5a40cfa0e84396cf Mon Sep 17 00:00:00 2001 From: Josh Skidmore Date: Wed, 19 Aug 2020 06:48:11 -0400 Subject: [PATCH] rework exist if there is no history --- zsh-fzf-history-search.zsh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/zsh-fzf-history-search.zsh b/zsh-fzf-history-search.zsh index fcdb8cd..b5a16c4 100644 --- a/zsh-fzf-history-search.zsh +++ b/zsh-fzf-history-search.zsh @@ -1,9 +1,5 @@ fzf_history_seach() { - local _history=$(history -i 0) - - [[ -z "$_history" ]] && exit - - echo -e "$_history"| fzf +s +m -x --tac -e | awk '{print substr($0, index($0, $4))}' | tr -d "\n" + history -i 0 | grep -v 1969 | fzf +s +m -x --tac -e | awk '{print substr($0, index($0, $4))}' | tr -d "\n" } autoload fzf_history_seach