Skip to content
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

Not working in Windows Terminal #1098

Open
sdegutis opened this issue Jan 24, 2022 · 19 comments
Open

Not working in Windows Terminal #1098

sdegutis opened this issue Jan 24, 2022 · 19 comments
Labels
dormant Marked by stale bot on close help wanted Extra attention is needed windows

Comments

@sdegutis
Copy link

sdegutis commented Jan 24, 2022

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
Copy link
Owner

Not a windows user here. Relying on contributors

@extrawurst extrawurst added the help wanted Extra attention is needed label Jan 24, 2022
@Lucky-Loek
Copy link

Lucky-Loek commented Jan 26, 2022

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
Copy link
Contributor

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

@enizor
Copy link

enizor commented Jan 26, 2022

I can reproduce it (Git-Bash inside Windows Terminal).
It's most probably related to git-for-windows/git#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
Copy link
Owner

see crossterm-rs/crossterm#580
and
#440

@zQueal
Copy link

zQueal commented Feb 7, 2022

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
Copy link

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

@TheOnlyTails
Copy link

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

@stale
Copy link

stale bot commented Sep 28, 2022

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.

@stale stale bot added dormant Marked by stale bot on close and removed dormant Marked by stale bot on close labels Sep 28, 2022
@yilmazdurmaz
Copy link

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
Copy link

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

@extrawurst
Copy link
Owner

So this can be closed?

@yilmazdurmaz
Copy link

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
Copy link

joyously commented Mar 8, 2023

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
Copy link

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
Copy link

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

@yilmazdurmaz
Copy link

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
Copy link

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.

Copy link

stale bot commented Mar 17, 2024

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.

@stale stale bot added the dormant Marked by stale bot on close label Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dormant Marked by stale bot on close help wanted Extra attention is needed windows
Projects
None yet
Development

No branches or pull requests

10 participants