extrawurst / gitui

Blazing 💥 fast terminal-ui for git written in rust 🦀
MIT License
17.83k stars 542 forks source link

Not working in Windows Terminal #1098

Open sdegutis opened 2 years ago

sdegutis commented 2 years ago

I downloaded your tar.gz and extracted and ran it in Windows Terminal in git-bash.

When I ran it plain, it actually printed control codes:

image

But here's the funny part. When I piped it like $ gitui.exe | cat, it worked:

image

extrawurst commented 2 years ago

Not a windows user here. Relying on contributors

Lucky-Loek commented 2 years ago

Installed with Scoop in latest Windows Terminal and runs perfectly fine, even picking up my custom color scheme without a hitch

EDIT can confirm it bugs in Git Bash as well. Powershell works fine.

image

ser-drephs commented 2 years ago

Can not confirm the bug with Gitui 0.20.1 and Windows Terminal 1.11.3471.0 on Windows 10.

enizor commented 2 years ago

I can reproduce it (Git-Bash inside Windows Terminal). It's most probably related to https://github.com/git-for-windows/git/issues/2483. I also noted that while the UI appears when running gitui directly from Git-Bash (no windows Terminal), the keybindings aren't working, so there's probably some other underlying issues.

As the others have already pointed out, it works fine if gitui is run under Windows Terminal directly (using either cmd.exe, Powershell or WSL). (git bash uses cygwin if I understood correctly).

extrawurst commented 2 years ago

see https://github.com/crossterm-rs/crossterm/issues/580 and https://github.com/extrawurst/gitui/issues/440

zQueal commented 2 years ago

I don't believe this is a terminal issue.

LeZv4jp

What font is being used? For reference, I'm using Hack Nerd Font. Give it a try.

TheOnlyTails commented 2 years ago

This is happening to me as well, using JetBrains Mono Nerd Font.

TheOnlyTails commented 2 years ago

I also replicated this on Git Bash with 0 config (using Cascadia Mono).

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had any activity half a year. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

yilmazdurmaz commented 1 year ago

right now, I am using version 0.22.1 on Windows 21H2.

I tried it on cmd.exe, powershell.exe (not pwsh) and git-bash and all seem to work fine (except shift and enter icons). It would be nice if you guys try again with this updated version.

Lucky-Loek commented 1 year ago

Yup, can confirm it now works in Git Bash without issue.

extrawurst commented 1 year ago

So this can be closed?

yilmazdurmaz commented 1 year ago

Hi @extrawurst , good and bad news on this problem. Bad is that I was partially wrong about "it works" part as it was not clear to me (as to OP, so missing info) how the git-bash was running in Windows Terminal. The good news is the helix editor has a way toward the solution.

when git is installed on windows, there are 2 Linux shell executables in 2 places. git-bash.exe in the installation root folder, and bash.exe (and a copy of it, sh.exe) under bin folder of the installation folder. the former is distinguishable as it opens its own window, yet the latter runs inside an open terminal or opens a new terminal.

I was using git-bash.exe and it clearly starts its terminal with the proper TUI settings so there is no problem. "bash.exe", on the other hand, starts without proper settings and causes the issue seen in the first post here. Unfortunately, I could not find how/where to set things proposed in linked issues (or they just won't work this way).

But I have found this helix editor project (also in rust language) that can run its tui fine within "bash.exe" terminal. It uses tui-rs library. Rust is well beyond me so I can't tell if they do this easily, but you may have a look at them. I hope it helps.

joyously commented 1 year ago

It uses tui-rs library.

The readme for that library has a list of apps that use it, and gitui is on the list.

yilmazdurmaz commented 1 year ago

It uses tui-rs library.

The readme for that library has a list of apps that use it, and gitui is on the list.

hmm, I did not notice that :) then that means the difference with helix editor is the usage of the library since it works within the bash.exe. I don't have the knowledge to dig in further, so I hope you guys have time for that ;)

dozhdikov99 commented 10 months ago

I run gitui from git-bash with command: winpty . Its work.

yilmazdurmaz commented 10 months ago

actually git-bash.exe was working already. anyways, I tried again bash.exe also seems to work now.

I used "seems" word, because there is a problem with modifier key icons; enter, tab, shift. both bash.exe and cmd.exe shows icons for them as a question mark in a box.

dozhdikov99 commented 10 months ago

I don't remember about the question marks, whether I have them displayed now or not. The main thing is that now my interface responds to the keys and updates the GUI correctly.

stale[bot] commented 3 months ago

This issue has been automatically marked as stale because it has not had any activity half a year. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.