-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[Feature Request] An option to set SHELL for preview command on Windows #2638
Comments
@junegunn I'm interested in working on this if it seems to be a reasonable addition. |
Solution 1 sounds good; |
You're right, SHELL is not set/used by Windows outside of Cygwin/Msys2. But solution 1 presents a problem: the SHELL variable would be set to a unix path, something like (note that there's a builtin utility called cygpath available inside Cygwin/Msys2, which can be used to convert unix/windows paths to and fro. If we really have to go with solution 1, we will have to use this utility to convert the interpreter's path before passing it to Go.) |
@junegunn To illustrate the above problem: git bash
echo-foobar.go
|
|
This makes fzf respect SHELL environment variable on Windows, like it does on *nix, whenever defined. Close #2638
man fzf
)Info
Problem / Steps to reproduce
Most of the interesting and useful tooling around fzf is built around POSIXy shells such as bash and zsh. I can think of three examples (I'm sure there are thousands others) on the top of my head:
Bash and zsh shells are readily available on Windows (Git Bash, MSYS2, cygwin), so the shell is not really an issue. The problem arises with preview commands in these tools, which always assume bash-like shells. So the preview in these tools does not work on Windows because fzf unconditionally uses cmd for the preview command, and doesn't respect SHELL (like it does on nix platforms).
Proposed solutions
Would love to hear more thoughts on this. The lack of preview support extremely limits the amount of fzf tools that can be used in MSYS2/Cygwin.
The text was updated successfully, but these errors were encountered: