Skip to content
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

[BUG] Startup broken on MSYS2 #241

Closed
FrostKiwi opened this issue Nov 27, 2021 · 10 comments
Closed

[BUG] Startup broken on MSYS2 #241

FrostKiwi opened this issue Nov 27, 2021 · 10 comments
Labels
bug Something isn't working

Comments

@FrostKiwi
Copy link

Describe the bug

I use MSYS2 with the MinGW64 environment and the ZSH shell. Installting fzf-tab fails, because running source ~/somewhere/fzf-tab.plugin.zsh results in fzf-tab.plugin.zsh:1: command not found: fzf-tab.zsh
This does not only concern the automatic install method. Same with zinit, see screenshot:
grafik

I am not even sure how to debug this. Clearly fzf-tab.zsh is there...
I can make sure:

  • [ x] I am using the latest version of fzf-tab
  • [ x] this is the minimal zshrc which can reproduce this bug
  • [ x] fzf-tab is loaded after compinit
  • [ x] fzf-tab is loaded after plugins which will wrap Tab, like junegunn/fzf/completion.zsh
  • [ x] fzf-tab is loaded before zsh-autosuggestions, zsh-syntax-highlighting and fast-syntax-highlighting.

Environment:

  • OS: Windows 10 - MINGW64_NT-10.0-19042
  • zsh version: zsh 5.8 (x86_64-pc-msys)

Minimal zshrc

Literally empty
Same after installing zinit

Log

Failed to load, so no fzf-tab logs

@FrostKiwi FrostKiwi added the bug Something isn't working label Nov 27, 2021
@Aloxaf
Copy link
Owner

Aloxaf commented Nov 28, 2021

How about source ~/somewhere/fzf-tab.zsh?

@FrostKiwi
Copy link
Author

@Aloxaf
Apparently nothing?
I double checked again, removed my zsh config, installed fzf from git again (since MSYS2 doesn't have it), fzf works but nothing happens after source fzf-tab.zsh.
No error, no fzf-tab function after I press tab to autocomplete something.

@Aloxaf
Copy link
Owner

Aloxaf commented Nov 30, 2021

I need some trace log. Can you press Ctrl+x . and provide the output?

图片

Aloxaf added a commit that referenced this issue Nov 30, 2021
@FrostKiwi
Copy link
Author

FrostKiwi commented Nov 30, 2021

@Aloxaf
When I press TAB, ZSH(?) complains with "unsupported key C:\msys64" for a split second. I had to screen record and playback in slowmotion to screenshot this.
image
Ctrl + X does not do anything either and also shows no error. In the text editor nano it properly exits the program, so Ctrl + X seems to work. I double checked and alacritty does not have a Keybinding on Ctrl + X that might block it either. When text is in the shell, Ctrl + X seem to select it. I guess selecting text via Ctrl + X is ZSH behaviour? Either way, no logs like you showed in the screen shot are returned.

All this was tested on a brand new MSYS install with an empty .zshrc and the newest commit you pushed 4 hours ago.

Extra frustrating is the fact, that I can't even get fzf to work properly half of the time. On one computer it works in alacritty but fails in the MSYS' provided mintty (Upon executing fzf it get's stuck in a manner similar to msys2/MINGW-packages#10113 (comment) ). On another one it suddenly stopped working in Alacritty as well. That needs some extra investigation I guess, but is hopefully not relevant to this issue.

@Aloxaf
Copy link
Owner

Aloxaf commented Nov 30, 2021

@Aloxaf When I press TAB, ZSH(?) complains with "unsupported key C:\msys64" for a split second. I had to screen record and playback in slowmotion to screenshot this. image Ctrl + X does not do anything either and also shows no error. In the text editor nano it properly exits the program, so Ctrl + X seems to work. I double checked and alacritty does not have a Keybinding on Ctrl + X that might block it either. When text is in the shell, Ctrl + X seem to select it. I guess selecting text via Ctrl + X is ZSH behaviour? Either way, no logs like you showed in the screen shot are returned.

it's C-x .
not C-x

Extra frustrating is the fact, that I can't even get fzf to work properly half of the time. On one computer it works in alacritty but fails in the MSYS' provided mintty (Upon executing fzf it get's stuck in a manner similar to msys2/MINGW-packages#10113 (comment) ). On another one it suddenly stopped working in Alacritty as well. That needs some extra investigation I guess, but is hopefully not relevant to this issue.

which version of fzf are you using? msys fzf or windows native fzf?

@FrostKiwi
Copy link
Author

it's C-x . not C-x

Ohhhhh. Yeah that works. The log looks a bit bare though:

+fzf-tab-debug:9> : zsh 5.8
+fzf-tab-debug:10> zle .fzf-tab-orig-fzf-completion
unsupported key: C:/msys64/
+fzf-tab-debug:11> unsetopt xtrace

I am using not the windows native version. Since the there is no fzf in either the MSYS packages or the MinGW64 packages, I installed it via git manually as described in the docs here: https://github.com/junegunn/fzf#using-git
It installed itself successfully into ZSH without errors and works flawlessly on this PC with the alacritty terminal. I am using MSYS with it's MinGW64 environment in case that matters.

@Aloxaf
Copy link
Owner

Aloxaf commented Dec 6, 2021

try put these lines to your zshrc (assuming your are using zinit)

zpcompinit; zpcdreplay
zinit light Aloxaf/fzf-tab

@Aloxaf
Copy link
Owner

Aloxaf commented Dec 6, 2021

not sure why

image

image

@Aloxaf
Copy link
Owner

Aloxaf commented Dec 6, 2021

reported to upstream: junegunn/fzf#2680

@Aloxaf Aloxaf closed this as completed in ace485b Dec 7, 2021
@Aloxaf
Copy link
Owner

Aloxaf commented Dec 7, 2021

Please update and try again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants