terminal: Arrow keys broken in msys2 bash programs after installing Terminal
Environment
Windows build number: Microsoft Windows [Version 10.0.18363.815]
Windows Terminal version (if applicable): 1.0
Any other software? msys2 bash version 4.4.23(2)-release (x86_64-pc-msys)
Steps to reproduce
- Note I also did an msys upgrade, which did upgrade msys2-runtime (3.0.7-6 -> 3.1.4-2). Not sure if that triggered this or installing Windows terminal did. I cannot find a way to safely revert my msys2-runtime package to confirm. 0a) Edit: Reverting msys2-runtime did not resolve the issue. 0b) Edit2: The same thing happens if I run bash directly via ConEmu with -new_console:p5
- Install msys2
- Run
cmd.exe - Run
C:\<msys2 install path>\usr\bin\bash.exe --login -i - Try to use an application that responds to arrow keys like
lessorvim - Note that the applications do not respond to arrow keys
- In
cmd.exesettings, select ‘Use legacy console’ - Repeat 2-4 after restarting
cmd.exe, observe applications respond to arrow keys again
Expected behavior
- less and vim and etc should respond to arrow keys (less should scroll, vim cursor should move)
Actual behavior
less, vim, etc. do not respond to arrow keys at all. bash history however does correctly respond, interestingly.
Side notes
For completeness, the full list of packages I upgraded before experiencing this issue: https://gist.github.com/akrieger/f3f7bdc38f22e663d156526ea94df839
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (1 by maintainers)
So this worries me more than you having the problem to begin with 😉
How long have you been forcing
TERM=cygwin? Was that a new change?msys 3.1 contains the runtime changes from cygwin 3.1. Cygwin 3.1 no longer treats the windows console as term=cygwin (it prefers
TERM=xterm-265now). If you were setting TERM=cygwin across an MSYS upgrade, there’s a chance applications were still expecting data from the cygwin console translator.