(no title)
Despacito2019 | 8 months ago
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-search
No comments yet.