Browse files

Default the TERM environment variable suitable for use with less.

By default on windows the TERM environment variable is configured as
'winansi' in git unless previously set. This is not accepted by the default
pager (less) which produces an error message:
 "WARNING: terminal is not fully functional"
Under git-bash TERM is configured by the shell as cygwin which less accepts
and here we configure it as "msys" which also is acceptable to less.

Signed-off-by: Theo Niessink <>
Signed-off-by: Johannes Schindelin <>
Signed-off-by: Pat Thoyts <>
  • Loading branch information...
1 parent eb87085 commit 4d0911dceccf1524a2d6aeb15bc25d9cdb1eb75d Theo Niessink committed with patthoyts Apr 11, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 cmd/git.cmd
@@ -10,6 +10,7 @@
@if not exist "%HOME%" @set HOME=%USERPROFILE%
+@if not defined TERM set TERM=msys
@if "%1"=="gui" @goto gui

0 comments on commit 4d0911d

Please sign in to comment.