-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible not to display the FZF until the common part is completed? #29
Comments
I agree: this tool should non-interactively complete the common leading part and wait for complete the rest if there are more than one items. |
I'm willing to take a PR to optionally enable this. |
I had the same issue. Maybe not the best workaround, what I did is trigger fzf completion only when the character before the cursor is not a letter or a digit. This way if I do: $ apti<TAB> It completes $ kill <TAB>
$ cd /<TAB> I still get the benefit of fzf completion. To do so, I added these lines in my function smart_completion() {
if [[ "$LBUFFER" =~ [a-zA-Z0-9]$ ]]; then
_main_complete
else
fzf_completion
fi
}
zle -C fzf_completion complete-word smart_completion |
For example, if I press tab after the text
apti
, ZSH without fzf-tab-completion will complete the command toaptitude
, which is already in my muscle memory. Using the plugin instead will show all the commands starting withapti
and I don't like this.Is it possible not to display FZF until the common part is completed, only if I press tab a second time (
apti
-> tab ->aptitude
-> tab -> FZF completion)?The text was updated successfully, but these errors were encountered: