terminal: GIT Bash has bad flicker
Environment
Windows build number: Microsoft Windows [Version 10.0.19042.423]
Windows Terminal version (if applicable): 1.1.2021.0
Any other software?
Git for windows: v2.28.0
Steps to reproduce
- Open a “GIT Bash” terminal session
- Press backspace key
Expected behavior
No nasty flicker
Actual behavior
Nasty flicker
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 56
- Comments: 17 (2 by maintainers)
To fix:
nano ~/.inputrc
and add the textset bell-style none
orset bell-style audible
. PressCtrl + O
andCtrl + X
to Save and Exit.I found this behaviour to be really distracting/disurbing. The regular Git Bash terminal does exhibit this behaviour, though I can confirm that
/c/Program Files/Git/etc/.inputrc
does containset bell-style visible
(and that command is not overwritten by anything in.inputrc
.Note that
set bell-style audible
does not give a ping sound in Git Bash in Windows Terminal, but it does do so in regular Git Bash.Git for Windows does install an
/etc
directory (perhaps mapped toC:\Program Files\Git\etc
) and an/etc/inputrc
file that includesset bell-style visible
.https://github.com/git-for-windows/build-extra/blob/1227299bc78df003c3b246edbd04a583ac162dc7/git-extra/inputrc#L1-L2
I believe the visual bell uses the
flash
capability from terminfo. Forxterm-256color
, the value is\E[?5h$<100/>\E[?5l
. AFAIK, Windows Terminal does not provide a way to disable the\E[?5h
and\E[?5l
control sequences. It might be best toset bell-style audible
orset bell-style none
in~/.inputrc
so that the setting will survive Git for Windows upgrades.set t_vb=
in .vimrc
That looks to me like they’re using the “visual bell”. Is there anything about
bell-style
in your~/.inputrc
or/etc/inputrc
?I keep coming back here way too many times 🤣
I don’t have a
~/.inputrc
file and this is GIT Bash on windows so no/etc
folder either - but I suspect you are correct as it does correlate with when I might normally hear a “bing”.Although the backspace is fixed, I still met the same issue during vi editing in git bash, and the workaround mentioned above is not working
I just made a copy to my local folder and commented that bell style line as follows
cd
go to your home directorycat /etc/inputrc > .inputrc
print inputrc content to .inputrc file in your home directory… don’t forget the DOTNow edit your local file
set bell-style visible
before# set bell-style visible
afterRestart your shell.
So, that’s because we only recently got support for visual bells at all. There’s an escape sequence that inverts the entire screen, and a visual bell is typically implemented by sending it, waiting a bit, and then sending it again.
Git Bash will start doing this inbox in Windows at some point with the next Desktop release, as it is required by standard for us to support it.