Fix #5
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
fzf_history_seach() {
|
fzf_history_seach() {
|
||||||
BUFFER=$(history -t '%Y-%m-%d %H:%M:%S' 0 | fzf +s +m -x --tac -e -q "$BUFFER" | awk '{print substr($0, index($0, $4))}')
|
setopt extendedglob
|
||||||
zle end-of-line
|
candidates=(${(f)"$(history -t '%Y-%m-%d %H:%M:%S' 0| fzf +s +m -x --tac -e -q "$BUFFER")"})
|
||||||
|
print -v BUFFER "${candidates[@]/(#m)*/${${(As: :)MATCH}[4,-1]}}"
|
||||||
|
zle end-of-buffer-or-history
|
||||||
}
|
}
|
||||||
|
|
||||||
autoload fzf_history_seach
|
autoload fzf_history_seach
|
||||||
|
|||||||
Reference in New Issue
Block a user