Skip to content
Snippets Groups Projects
Commit 07f176f4 authored by Junegunn Choi's avatar Junegunn Choi Committed by GitHub
Browse files

Merge pull request #595 from aykamko/speed-up-fzf-completion

Optimize fzf_default_completion binding
parents 3e1d6a7b 19339e3a
No related branches found
No related tags found
No related merge requests found
......@@ -181,8 +181,11 @@ fzf-completion() {
fi
}
[ -z "$fzf_default_completion" ] &&
fzf_default_completion=$(bindkey '^I' | \grep -v undefined-key | awk '{print $2}')
[ -z "$fzf_default_completion" ] && {
binding=$(bindkey '^I')
[[ $binding =~ 'undefined-key' ]] || fzf_default_completion=$binding[(w)2]
unset binding
}
zle -N fzf-completion
bindkey '^I' fzf-completion
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment