-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mingw: set $env:TERM=xterm-256color for newer OSes #3751
Conversation
04c635b
to
528ed92
Compare
@dscho Hey, can you trigger the CI again please, it's giving me a fail on old code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! This is a good start, I left a couple of suggestions how I think this PR could be improved, still.
4dbb2fc
to
f634351
Compare
@dscho In the interests of getting this fix out, I used your method, we can revisit the build number issue later. |
I tested this and it does work with the manifest. |
Hi @rkitover, you misspelled my username in your PR description, so I just saw this :) I think the fix makes sense: cmd and PowerShell do not set For completeness, you could mention the history of this part of the code, linking the commits mentioned in #3629, but I don't think it's necessary. Small nit: I would capitalize "Windows" in the commit message. |
For Windows builds >= 15063 set $env:TERM to "xterm-256color" instead of "cygwin" because they have a more capable console system that supports this. Also set $env:COLORTERM="truecolor" if unset. $env:TERM is initialized so that ANSI colors in color.c work, see 29a3963 (Win32: patch Windows environment on startup, 2012-01-15). See git-for-windows#3629 regarding problems caused by always setting $env:TERM="cygwin". This is the same heuristic used by the Cygwin runtime. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
@phil-blain I've made these changes. |
@dscho Any objections to merging this as-is? This is literally your code, and the manifest issue is unrelated, this will work fine in the normal MINGW builds, I will try to deal with the manifest for VS builds later in a separate PR. Offtopic, on the other PR, I will make the changes as per your preferences as I've said, I've been distracted the past couple of weeks with feeling horrible and working on an issue in another project, but I will switch to this now. |
Thank you! And please forgive me that I could not take care of this PR sooner. |
On newer Windows versions, Git [now assumes a Win32 Console with full color capabilities](git-for-windows/git#3751). This helps e.g. when NeoVIM is configured as Git's editor. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
mingw: set $env:TERM=xterm-256color for newer OSes
@dscho @phil-blain @rimrul
Hi guys, this is half of my fix for #3629.
Once this is done I will try to fix quoting/escaping in
$env:EDITOR
which was the other problem there.