mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-26 06:46:35 +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
|
# http://zsh.sourceforge.net/FAQ/zshfaq03.html
|
||||||
tokens=(${=LBUFFER})
|
tokens=(${=LBUFFER})
|
||||||
if [ ${#tokens} -lt 1 ]; then
|
if [ ${#tokens} -lt 1 ]; then
|
||||||
zle expand-or-complete
|
eval "zle ${fzf_default_completion:-expand-or-complete}"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -145,10 +145,12 @@ fzf-completion() {
|
|||||||
fi
|
fi
|
||||||
# Fall back to default completion
|
# Fall back to default completion
|
||||||
else
|
else
|
||||||
zle expand-or-complete
|
eval "zle ${fzf_default_completion:-expand-or-complete}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fzf_default_completion=$(bindkey '^I' | grep -v undefined-key | awk '{print $2}')
|
||||||
|
|
||||||
zle -N fzf-completion
|
zle -N fzf-completion
|
||||||
bindkey '^I' fzf-completion
|
bindkey '^I' fzf-completion
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user