From daf2367e9d1035aa3d9e4c7acd7a29fff3a3633d Mon Sep 17 00:00:00 2001 From: Stefan Hojer Date: Tue, 31 Aug 2021 01:29:18 +0200 Subject: [PATCH] feat: use `fc` instead of `history` --- zsh-fzf-history-search.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh-fzf-history-search.zsh b/zsh-fzf-history-search.zsh index af97444..5bce856 100644 --- a/zsh-fzf-history-search.zsh +++ b/zsh-fzf-history-search.zsh @@ -1,6 +1,6 @@ fzf_history_seach() { setopt extendedglob - candidates=(${(f)"$(history -t '%Y-%m-%d %H:%M:%S' 0| fzf +s +m -x --tac -e -q "$BUFFER")"}) + candidates=(${(f)"$(fc -li -1 0 | fzf +s +m -x -e -q "$BUFFER")"}) BUFFER="${candidates[@]/(#m)*/${${(As: :)MATCH}[4,-1]}}" BUFFER="${BUFFER[@]/(#b)(?)\\n/$match[1] }"