gitui icon indicating copy to clipboard operation
gitui copied to clipboard

Not working in Windows Terminal

Open sdegutis opened this issue 3 years ago • 19 comments

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

sdegutis avatar Jan 24 '22 21:01 sdegutis

Not a windows user here. Relying on contributors

extrawurst avatar Jan 24 '22 21:01 extrawurst

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

Lucky-Loek avatar Jan 26 '22 13:01 Lucky-Loek

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

ser-drephs avatar Jan 26 '22 13:01 ser-drephs

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).

enizor avatar Jan 26 '22 13:01 enizor

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

extrawurst avatar Jan 26 '22 14:01 extrawurst

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.

zQueal avatar Feb 07 '22 02:02 zQueal

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

TheOnlyTails avatar Feb 11 '22 19:02 TheOnlyTails

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

TheOnlyTails avatar Feb 16 '22 15:02 TheOnlyTails

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[bot] avatar Sep 28 '22 04:09 stale[bot]

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.

yilmazdurmaz avatar Feb 21 '23 16:02 yilmazdurmaz

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

Lucky-Loek avatar Feb 28 '23 15:02 Lucky-Loek

So this can be closed?

extrawurst avatar Feb 28 '23 18:02 extrawurst

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.

yilmazdurmaz avatar Mar 08 '23 15:03 yilmazdurmaz

It uses tui-rs library.

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

joyously avatar Mar 08 '23 23:03 joyously

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 ;)

yilmazdurmaz avatar Mar 08 '23 23:03 yilmazdurmaz

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

dozhdikov99 avatar Aug 11 '23 17:08 dozhdikov99

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.

yilmazdurmaz avatar Aug 11 '23 17:08 yilmazdurmaz

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.

dozhdikov99 avatar Aug 11 '23 17:08 dozhdikov99

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[bot] avatar Mar 17 '24 15:03 stale[bot]