-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Windows support (go) #147
Comments
appveyor can be used for the builds. You'd have to install Go manually though. |
@untitaker Thanks, I'll look into it. |
I managed to compile ncurses on Windows using mingw-w64 on msys, but that alone didn't help much. It looks like there are many more issues to be handled 😕 Since I don't think I'll be able to find enough time to continue working on Windows support, I'll just leave this issue open. Please let me know if anyone's interested in contributing. |
Currently I'm trying to get through this problem but there's so many hard-coded |
I somehow built the fzf but I recieved below:
Reference |
@simnalamburt Unfortunately, that is how go projects are laid out.
I myself am not sure which would be the best way to handle this. You might want to take a look at the answers here: |
no idea if this is helpful, but just in case: https://github.com/gdamore/tcell is a go alternative to termbox, seems like a new project |
@jfun reported that fzf runs on linux subsystem of Windows 10. I haven't had a chance to try it, but it sounds promising. |
WSL is only limited to windows 10 though. :( |
I have an alpha version of fzf for Windows available here: https://github.com/kelleyma49/fzf/tree/WindowsTermbox . Make sure to checkout the WindowsTermbox branch. This version uses termbox-go instead of ncurses, and it doesn't need cygwin. Run |
@kelleyma49 Thank you for you awesome work! This is exactly what I was looking for. @junegunn How do you think of this branch? Is it seems to be able to be merged? |
@kelleyma49 Awesome. This is a game changer for me on Windows, hope to see it incorporated! |
@kelleyma49 Is curses needed on any platform, with that branch? Why not use termbox for all platforms? |
@simnalamburt It looks promising but it isn't ready to be merged. Some features are commented out. I see it more as a proof-of-concept implementation as for now. But if you just need the basic features, this might be already usable. @kelleyma49 Cool, thanks! Did you have any issues while porting the code to termbox? I considered using termbox before I started on rewriting fzf in Go (late 2014), but it lacked some features fzf needed such as the support for 256 color terminal and mouse. I guess things have changed over the time? (https://github.com/nsf/termbox/releases) If we can implement everything ncurses provides using termbox, it does make sense to migrate to termbox completely like @justinmk suggested. But I wouldn't go that far at this stage. If it ain't broke, why fix it? I have much trust in battle-tested ncurses and I expect things to be less stable with its much younger alternative. Implementation-wise, I think we should do some refactoring of extracting non-portable parts of the code first, to minimize code duplication I see in your branch. Then we can rebase your work on it. Also I would make it possible to build fzf with termbox even on non-Windows platform using build tags. I'll let you know of the progress. |
@junegunn - I agree, it isn't ready to be merged. It's not feature parity yet (for example, preview window doesn't work.) You've abstracted the curses enough that I don't think it would be a problem to keep ncurses and the termbox-go implementations around until you're satisfied that termbox-go (or another solution) matches the features and performance of the ncurses. Let me cleanup the code and test some more before I attempt a pull request. |
@kelleyma49 I noticed that your branch is behind a few versions (0.15.1 vs 0.15.5) and doesn't compile on non-Windows platform, and I felt there's more code we can refactor out. So I did some base work last night to make it easier to add termbox support. I'll push it to a new branch and request that you rebase your work on it. |
@kelleyma49 Please take a look at: https://github.com/junegunn/fzf/commits/termbox. It will build with termbox on Windows or when ( |
And the crowd cheers in support 👯♂️ |
Windows binaries are now available. Thanks @kelleyma49. https://github.com/junegunn/fzf-bin/releases Unfortunately fzf still doesn't run on cygwin or msys since neither termbox nor tcell supports the platform. |
If you use PowerShell, feel free to try out my module that wraps fzf: https://github.com/kelleyma49/PSFzf. |
Why?
😮
Parts that are not Windows-friendly
#include <unistd.h>
isatty
find
sh -c
to start default command set by$FZF_DEFAULT_COMMAND
The text was updated successfully, but these errors were encountered: