by Despacito2019 · 1y ago · 0 comments
insert_atuin_with_fzf () {
local result
result=$(atuin history list --reverse --format "{command}" | \
awk '!seen[$0]++ && length($0) > 2 && !/^j /' | \
fzf +s)
[[ -n $result ]] && LBUFFER+="$result"
}
# Bind the widget to Ctrl-Q
zle -N insert_atuin_with_fzf
bindkey -M emacs '^q' insert_atuin_with_fzf
bindkey -M emacs '^x^q' atuin-searchNo comments yet.