Skip to content
Snippets Groups Projects
Commit 0b770cd4 authored by Junegunn Choi's avatar Junegunn Choi
Browse files

[zsh-completion] Remember what ^I was originally bound to (#230)

parent c14aa99e
No related branches found
No related tags found
No related merge requests found
......@@ -104,7 +104,7 @@ fzf-completion() {
# http://zsh.sourceforge.net/FAQ/zshfaq03.html
tokens=(${=LBUFFER})
if [ ${#tokens} -lt 1 ]; then
zle expand-or-complete
eval "zle ${fzf_default_completion:-expand-or-complete}"
return
fi
......@@ -145,10 +145,12 @@ fzf-completion() {
fi
# Fall back to default completion
else
zle expand-or-complete
eval "zle ${fzf_default_completion:-expand-or-complete}"
fi
}
fzf_default_completion=$(bindkey '^I' | grep -v undefined-key | awk '{print $2}')
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