9

Background:

When using my Windows version of git in Powershell I found that I got the error "terminal is not fully functional" so I used the second solution posted here (i.e. change TERM to msys) to fix the problem.

However, this caused a secondary problem that when SSH'd into my Vagrant box, command line apps like Vim, Nano and even Clear would not run, producing errors "msys: unknown terminal type."

I then attempted to change TERM to "ansi" and I got better results during ssh, in that the apps would run fine, but there are still formatting errors.

Question:

Is there a setting for TERM in windows environment variables that will work properly for both my Windows copy of Git and the Vagrant VM Bash shell via SSH?

1
  • Which version of git.exe are you using? I've seen the error you're describing while in PowerShell before, but I haven't had to deal with it in a while. I'm running git version 1.9.5.msysgit.0 (you can see your version by running git --version). Commented Mar 17, 2015 at 16:59

1 Answer 1

6

The combination that works best for me is:

:: set proper TERM to not break `vagrant ssh` terminal, 
:: see https://github.com/tknerr/bills-kitchen/issues/64
set TERM=cygwin

:: trick vagrant to detect colored output for windows, see here:
:: https://github.com/mitchellh/vagrant/blob/7ef6c5d9d7d4753a219d3ab35afae0d475430cae/lib/vagrant/util/platform.rb#L89
set ANSICON=true

:: mute the cygwin warning which otherwise comes on `vagrant ssh`
set CYGWIN=nodosfilewarning

(excerpt from the set-env.bat file from bills-kitchen)

Sign up to request clarification or add additional context in comments.

1 Comment

Note that I'm mostly using this from a plain ConEmu wrapped cmd.exe shell. Not sure if these are the best settings for powershell though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.