terminal: do not use escape codes on windows unless they are supported

This commit is contained in:
Alex Brainman
2016-03-09 15:20:03 +11:00
committed by aarzilli
parent e88ea83e1d
commit ff0ec8ce00
3 changed files with 45 additions and 1 deletions

View File

@ -42,7 +42,7 @@ func New(client service.Client, conf *config.Config) *Term {
line: liner.NewLiner(),
client: client,
cmds: cmds,
dumb: strings.ToLower(os.Getenv("TERM")) == "dumb",
dumb: !supportsEscapeCodes(),
}
}