mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-12-23 03:19:01 +00:00
[zsh-completion] Remember what ^I was originally bound to (#230)
This commit is contained in:
parent
c14aa99ef6
commit
0b770cd48a
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user