-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Support cygwin #11238
Support cygwin #11238
Conversation
16fbfdb
to
b26cf23
Compare
d132e40
to
a100316
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine by me, I think @ridiculousfish would like to take a look.
Awesome work, btw
Thanks for your excellent work. I tried to test it with the latest version(version 4.1.0-alpha0-g509826571) under msys2, but encountered a strange bug. Every time I type a character, a new line is created. I don't know whether I should open a new issue because cygwin does not officially support it yet. |
@ahaoboy Do you use |
I use starship, which works fine on fish 3.7.1 https://packages.msys2.org/base/fish
|
OK, seems that the problem is a little complex. I'll look into it. You may try to disable starship temporarily and see if the problem is solved. |
This is an issue where I would suspect the terminal, not the prompt. Fish 4.0 is more demanding on the terminal, and that can trigger bugs. This isn't a manifestation I've seen, but I know the most frequent trigger is the kitty keyboard protocol, so try |
I removed all plugins and configurations, and only added a prompt configuration. The printf function will add a new line every 3 or 4 inputs. I don't know if there are other possible reasons. It depends on whether other Windows users can reproduce the problem with the same configuration.
|
Well, I can reproduce such problem with oh-my-posh, both with Windows Terminal and mintty. It might be some misc problems between fish and cygwin api and terminal... |
Don't put that in config.fish. It will cause the universal variable to grow. It's enough to run it interactively. If you must have it in config.fish, use contains -- no-keyboard-protocols $fish_features
or set -Ua fish_features no-keyboard-protocols |
@ahaoboy I can reproduce your problem with your config. It's not adding a new line in 3 or 4 inputs. It's adding a new line once per second you input. |
Terminal timestamps, see Lines 854 to 873 in 360cfdb
You might want to add Cygwin to has_working_tty_timestamps' exceptions. |
Thank you, @faho ! I have pushed the change and now the problem should be fixed. |
Can you update https://github.com/Berrysoft/fish-shell/releases? I also want to test if there are any other issues in starship |
My custom release has been updated. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
5efecd7
to
55719ab
Compare
Seems that |
which LLVM tree do I use to build the rust target? |
The patch for LLVM has been merged, so I think the latest release is OK. The latest version of nightly rustc is also OK. Now there's no pre-built std. You can use |
ah ok, But it seems we need a new libc release (for |
A windows host can do that, and I even wrote a PKGBUILD for MSYS2: https://github.com/Berrysoft/fish-msys2/
Yes, we need a new |
thanks, that's very useful |
merged; I squashed some of your commits (hope that's not a problem) and changed only one line I think ( |
Will update the document to add Windows installation and compilation steps? https://github.com/fish-shell/fish-shell?tab=readme-ov-file#windows |
Once it's available upstream in a reasonable fashion - not as long as it involves installing forks, PRs, patches and special repos. |
Description
This PR adds support for Cygwin & MSYS2.
wchar_t
is UTF-16.wcwidth
isreplaced byremoved.unicode-width
.wcrtomb
andmbrtowc
are replaced byc32rtomb
andmbrtoc32
.Fixes issue #10956, though it has been closed.
Tracking:
TODO: