-
Notifications
You must be signed in to change notification settings - Fork 11
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-git functions not working on MSys2 bash (Git bash) #4
Comments
Thank you for the report! These functions are actually copied from https://gist.github.com/junegunn/8b572b8d4b5eddd8b85e5f4d40f17236, so maybe you also want to report it there.
You can copy the file, edit it as you like and load the edited file in $ mkdir -p ~/.local/share/blesh/local
$ cp /path/to/contrib/fzf-git.bash ~/.local/share/blesh/local/my-fzf-git.bash
$ EDIT ~/.local/share/blesh/local/my-fzf-git.bash # blerc
ble-import -d my-fzf-git The custom search path of |
Yes, I knew that but the gist interface isn't really very useful for giving feedback (and upon seeing the thread, the author doesn't seem to be very active in the comments). Anyway, I doubt that I can edit the functions myself and make them work 😅 Thanks for quick reply. Should I close this then? |
Maybe we can work around it by specifying the shell in the following way: - --preview 'xxxxx' |
+ --preview 'bash -c "xxxxx"' | but I'm not sure if that is the appropriate or intended way of
We notice that we can change the executing shell through the environment variable
|
I don't think this is possible. Golang only supports the native toolchain on Windows. While there are numerous Unix toolchains for Golang, they include neither Cygwin nor MSys2. The only way to do this is to build Golang itself from source by studying and defining the appropriate Go build flags (corresponding to the ones listed here) and use that to build Surprisingly, the Cygwin repos do include a very old port of
This is a very tricky request. Let's say we propose a variable Also, since the introduction of WSL, there actually is a
This might not sound good on principle, but it might just be the simplest and most non-invasive workaround. We can specify Edit: typo |
Doesn't that mean it is possible to make it work in Cygwin (and also in its fork MSYS2) though I'm not sure how much it has been modified in patching? Edit: I have checked
I'm not saying that we propose making the default shell
Use
Are there any known problems that happen when the shell is changed to bash?
I just tried |
Oh, is that so. I was aware that fzf was originally in Ruby, but I forgot at which version the author switched to Go.
Yes yes, it won't necessarily be bash.
Oh shoot! I was typing that on phone; it's an extremely stupid typo (more so because
Yes, too many to list down here... Try launching any Rust TUI applications written for Windows from bash. More details here - crossterm-rs/crossterm#580
fzf doesn't work with mintty terminal. It does work if you use bash from conhost (the default older Windows terminal) or from the newer Windows Terminal. Actually, most Windows-native binaries won't work on mintty - like ssh.exe (the win32 binary, not the MSYS2 binary), neovim.exe, cmd.exe, powershell.exe or wsl.exe. There's a way to mitigate this - by setting |
Closed by junegunn/fzf#2641 |
Not sure if this is the right place to ask for help, but I want to give it a shot anyways.
While the functions themselves are bash statements, fzf' preview argument gets executed under cmd (and not bash) on Windows. This causes certain problems, listed below:
blesh-contrib/fzf-git.bash
Line 23 in 9e145d5
<<<
operator is used which does not exist in cmd. It also uses command substitution$(...)
which cmd doesn't support.blesh-contrib/fzf-git.bash
Line 31 in 9e145d5
<<<
operator is used here too.blesh-contrib/fzf-git.bash
Line 48 in 9e145d5
It might be too much to ask, but is there a way to modify them so that they don't use such operators?
The text was updated successfully, but these errors were encountered: