-
Notifications
You must be signed in to change notification settings - Fork 274
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
UCM on Windows gives strange prompt #3275
Comments
Additionally, but I don't know if it is strictly related, non-ASCII characters (e.g. emojis) are not displayed correctly. Instead, I see boxed question marks. |
haskell/haskeline#130 seems like it might be related to the prompt issue. It suggests https://github.com/judah/haskeline/wiki/ControlSequencesInPrompt as a potential workaround (as the actual fix PR seems to have gone stale). I lack a Windows machine to test it on. Not sure about emojis. There seem to be some dragons here for Windows. That's a bummer; I thought that we were well into the age of Unicode. |
@ceedubs The emojis are less of a concern, and I see from the Windows issue you linked, that we will have to be patient anyhow. But the ANSI sequences being mishandled is more serious. I appeal to the developers of UCM to have a close look, because it used to work in M2 and (I think) M3. So something broke it. |
I found out that it looks fine on GitBash. Could be a reasonable temporary solution. As for Emojis and ANSI sequences on Windows, I can confirm that they work. I spent a couple of days last week patching Elixir to make it work with a patched version of OTP 26, that has a new cross-platform TTY. Emojis cannot be displayed in cmd.exe or pwsh.exe. A modern terminal is needed, like Windows Terminal, WezTerm or Alacritty. |
I have tried Windows Terminal, but it does not help with the prompt. Where does one get GitBash? |
It comes bundled with Git for Windows. |
If it helps, when I run GitBash on its own, this works. |
Yes, that is expected. The guide shows how to execute bash.exe (which is a shell, just like cmd.exe or pwsh.exe) within Windows Terminal (a terminal emulator, just like WezTerm or Alacrity). To my knowledge haskeline works on MinGW, which has its own terminal emulator and is the one used by GitBash. |
I have now downloaded the latest pre-release (723eaf6) and it shows the following:
At least some of the ANSI codes are gone, but other unreadables have taken their place! It looks like this has to do with color (the emojis look OK). |
In cmd.exe execute `chcp 65001` before executing ucm. It tells the console to interpret program output as UTF-8-encoded strings. HTH
Am 16. August 2022 13:41:34 MESZ schrieb Rudolf Meijer ***@***.***>:
…I have now downloaded the latest pre-release (723eaf6) and it show the following:
```
Now starting the Unison Codebase Manager (UCM)...
_____ _
| | |___|_|___ ___ ___
| | | | |_ -| . | |
|_____|_|_|_|___|___|_|_|
👋 Welcome to Unison!
You are running version: 723eaf6
Get started:
📖 Type help to list all commands, or help <cmd> to view help for one command
🎨 Type ui to open the Codebase UI in your default browser
📚 Read the official docs at https://www.unison-lang.org/learn/
🌎 Visit Unison Share at https://share.unison-lang.org to discover libraries
👀 I'm watching for changes to .u files under C:\Users\rudol\Projects\Unison
.>`
```
At least some of the ANSI codes are gone, but other unreadables have taken their place!
-- >
Reply to this email directly or view it on GitHub:
#3275 (comment)
You are receiving this because you commented.
Message ID: ***@***.***>
|
You're not supposed to have to |
I think a better fix than #3307 is probably along the lines of haskell/haskeline#130, but it means resurrecting our haskeline fork to apply the patch. I'm looking into reproducing the new behavior Rudolf posted. |
FYI: chcp65001 does not help. |
I downloaded the latest pre-release. WezTerm can correctly display ucm's welcome message. Maybe it is a good idea to take a look at the code and see what it is doing. |
Everyone should please include screen shots when describing visually weird or non-weird output 🙏 |
Running ucm from latest pre-release (August 27th 2022):
@aryairani I wonder why the Get Started section is empty. Any ideas? |
The release M4b improved things, but this issue is still not solved. @aryairani Why is it closed? |
I am on W11 using M4a with Windows Console Host and I have no problems anymore. Did not test M4b or M4c though. |
I can confirm that M4c works! Thanks a lot Unison team :) |
I am running release/M4 of
ucm.exe
on Windows 11. The prompt is[0m[32m.[0m> [0m
which seems to indicate a wrong interpretation of ANSI escape sequences by my terminal application (both Windows Console Host and Windows Terminal exhibit this behaviour). The multicolour ASCII art in the banner is displayed correctly, though.The text was updated successfully, but these errors were encountered: