mirror of
https://github.com/joshskidmore/zsh-fzf-history-search.git
synced 2026-09-10 07:06:21 -04:00
feat: use fc instead of history
This commit is contained in:
parent
54f8015e01
commit
daf2367e9d
|
|
@ -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]
|
||||
}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue