Description
I open Git Bash and run a Git command like git commit --amend
or git rebase -i HEAD^
- something that opens nano with a temporary file that ought to have Git-specific highlighting.
Observed behavior in versions marked below as "broken": There is no highlighting. Additionally, on further investigation:
nano /etc/nanorc
also does not do any highlighting, implying it is probably an issue with highlighting overall, not Git-specificnano -z
, which according tonano -h
and the nano News page should list the names of available syntaxes, outputs nothingls /usr/share/nano
shows all the files I'd expect to see
This happens both when using Git Bash (via MinTTY) and when using the Windows 11 Terminal Profile (created by selecting the relevant option in the installer).
As the last working version of Git for Windows contains nano 8.0, which does not support nano -z
, my thinking here is that when nano added the -z
option, they also somehow broke something that the Git for Windows build relies on.
Expected behavior: highlighting works and nano -z
lists available syntaxes.
Versions tested
- Git for Windows 2.48.1 - contains nano 8.3 - broken
- Git for Windows 2.47.1.2 - contains nano 8.2 - broken
- Git for Windows 2.46.2 - contains nano 8.2 - broken
- Git for Windows 2.45.2 - contains nano 8.0 - works
- Git for Windows 2.44.1 - works
- Git for Windows 2.43.0 - works
- Git for Windows 2.42.0 - works
Full install information
- Components: Open Git Bash Here, Git LFS, Add Git Bash Profile to Windows Terminal (no others)
- Editor: nano
- Branch name: master
- Git from the command line and also from 3rd-party software
- Bundled OpenSSH
- Native Windows Secure Channel library
- Checkout as-is, commit Unix-style line endings
- Use MinTTY
- Only ever fast-forward
- Credential helper: None
- Extra options: Enable file system caching, disable symbolic links
- Experimental options: disabled