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 ~/.inputrcand add the textset bell-style noneorset bell-style audible. PressCtrl + OandCtrl + Xto 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/.inputrcdoes containset bell-style visible(and that command is not overwritten by anything in.inputrc.Note that
set bell-style audibledoes 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
/etcdirectory (perhaps mapped toC:\Program Files\Git\etc) and an/etc/inputrcfile 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
flashcapability from terminfo. Forxterm-256color, the value is\E[?5h$<100/>\E[?5l. AFAIK, Windows Terminal does not provide a way to disable the\E[?5hand\E[?5lcontrol sequences. It might be best toset bell-style audibleorset bell-style nonein~/.inputrcso 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-stylein your~/.inputrcor/etc/inputrc?I keep coming back here way too many times 🤣
I don’t have a
~/.inputrcfile and this is GIT Bash on windows so no/etcfolder 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
cdgo to your home directorycat /etc/inputrc > .inputrcprint inputrc content to .inputrc file in your home directory… don’t forget the DOTNow edit your local file
set bell-style visiblebefore# set bell-style visibleafterRestart 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.