diff --git a/session.go b/session.go index 20e0dca..266be4f 100644 --- a/session.go +++ b/session.go @@ -195,7 +195,11 @@ func (sess *session) LocalAddr() net.Addr { } func (sess *session) Environ() []string { - return append([]string(nil), sess.env...) + env := append([]string(nil), sess.env...) + if sess.pty != nil { + env = append(env, "TERM="+sess.pty.Term) + } + return env } func (sess *session) RawCommand() string {