-
-
Notifications
You must be signed in to change notification settings - Fork 149
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
fzf trigger sequence (**) does not work as expected (even using control + space) #51
Comments
Well, there's the crux of the matter: I never promised any such thing. 😉 This is completely intentional. Since you now have one key binding for normal completion and one key binding for However, I could make it so that Let's discuss: How should this really behave? There's more than one way to go about this and there is no obvious "right" one. 🙂 |
Misunderstanding on my part! 😅 So—if I'm understanding correctly—control+␣ is essentially the same as control+T (the default keyboard shortcut fzf creates)? I think the main issue on my end is that # Without zsh-autocomplete
❯ cd dir/** [TAB]
>
3/3
> dir/file1.txt
> dir/file2.txt
> dir/file3.txt # With zsh-autocomplete
❯ cd dir/[CTRL] [SPACE]
>
3/3
> dir/file1.txt
> dir/file2.txt
> dir/file3.txt
> folder/file1.txt
> folder/file2.txt
... Similarly, there are a few other smart completion features, like a custom fuzzy completion API. If feasible and maintainable, a smart behavior for My ideal API is a bit different from the one outlined. As far as I know, as outlined in the documentation, there are only a few cases where hitting tab activates fzf.
From my understanding, only the For the smart behavior for Thanks for getting back to me and hearing out my thoughts! |
fzf has 4 different completion methods: I think (not sure) what you end up with with this plugins [Ctrl]+[Space] is fzf-file-widget and that's not behaving as I want it to. I'm testing this primarily will "kill"-command right now and there it gives me an acceptable behaviour. |
That'd be a nice solution imho, but the "ugly" part is that it requires to copy all the special rules from fzf and make sure to keep them updated (not sure how often they change) |
No, it's not. It's actually ⌥␣ It works as follows:
|
@marlonrichert I tried out 👍fzf-specific tab features seem to be working as expected
👎Pressing tab under "normal" expected circumstances leads to unexpected behavior.
So it seems that fzf works fine, but at the expense of the normally expected tab behavior. |
On your command line, can you please run
That has nothing to do with In general, with |
@paw-lu I did some testing and actually, How exactly have you installed |
I can confirm that you are correct about ❯ bindkey '^I'
"^I" fzf-completion Is there an issue with that? That seems to be one of the default shortcuts that are bound when I want to clarify about the Homebrew example. That was just a random command I chose and was not specific to homebrew. This happens across all commands. As far as I can tell, it is not "slow"—completion just isn't happening when hitting tab. Just to clear things up I recorded my screen. First I show how directory and argument autocomplete normally work, then I activate zsh-autocomplete, then I try those two again. You can also see one way I "install" zsh-autocomplete in the recording. |
Yes, there definitely is a major issue with that. It means that |
Yeah no problem! 😄 I'm able to replicate this with an absolute minimum # Minimum .zshrc via oh-my-zsh
plugins=(
zsh-autocomplete
)
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
zstyle ':autocomplete:tab:*' completion fzf
Obviously, it follows that we can reproduce this issue with a completely blank % [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
% zstyle ':autocomplete:tab:*' completion fzf
% source zsh-autocomplete.zsh
% bindkey '^I'
"^I" fzf-completion Just for my understanding—I thought the goal here is to keep fzf running as expected and to keep zsh-autocomplete from "interfering" with its features. So I would naively think that fzf's default shortcuts should be surviving. |
Ah, right, I completely forgot about that. 🤦🏽♂️ That explains the Thanks! Now I know what to tweak. |
Gave it a quick look. As far as I can tell this seems good! 👍tab features seem to be working as expected
|
@ztNFny How do you feel about the current behavior on the |
I'm willing to close this @marlonrichert is everyone is comfortable with the changes. |
I'll try to take a look tomorrow/Sunday. Busy at work right now. |
@marlonrichert sorry, still hadn't had the chance, work is killing me atm |
just had a quick look at dev, more hopefully on the weekend:
|
What's the new magic space behavior?
Paulo S. Costa
…On Wed, Jun 24, 2020, 1:22 PM ztNFny ***@***.***> wrote:
just had a quick look at dev, more hopefully on the weekend:
- kill [tab] looks good
- so does FZF_COMPLETION_TRIGGER
- the new default "magic" space behaviour is killing me, don't think
that's a good default option imho. especially the alias seems uncalled for.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#51 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHFIKRQ2CC3GQUEYGG2JTNTRYJOBXANCNFSM4NZ7EMUA>
.
|
See README.MD in dev. Basically it expands pretty much anything. History, suggestions, alias (this i find the most annoying, the point of aliases is to not gave the original command), spellcheck. |
Auto-expanding aliases is related to #60. I’ve read that it actually works like that in Fish. But I do agree that it’s not very nice when you have very long aliases. I’ll have to tweak that a bit still. |
But anyway, if the |
@marlonrichert fish doesn't insert aliases. |
OK, good to know. I just read it somewhere. ¯\_(ツ)_/¯ |
Ah, I just discovered that what I'm doing to address #60 is completely unnecessary. I'll remove it soon. |
Merged to |
This is some really cool work. Thanks for sharing it!
Describe the bug
The fzf search menu no longer seems to pop up when the trigger sequence is used when zsh-autocomplete is enabled, even when using the new shortcut—control␣.
To Reproduce
Steps to reproduce the behavior:
Of course, this fixes itself if I run
zstyle ':autocomplete:tab:*' completion fzf
. tab is now controlled by fzf, and the trigger sequence**
works as expected. But then normal autocomplete seems broken at that point.Expected behavior
I thought control␣ (with zsh-autocomplete) would trigger the kind of behaviour fzf would trigger by hitting tab normally (without zsh-autocomplete).
Desktop
The text was updated successfully, but these errors were encountered: