Skip to content

Commit

Permalink
Set TERM=xterm-256color
Browse files Browse the repository at this point in the history
This helps ensure a proper TERM value when running from e.g. systemd or
VSCode's debugger.

Fixes #5
  • Loading branch information
sorenisanerd committed Apr 18, 2021
1 parent d503d91 commit 11396d7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/localcommand/local_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ type LocalCommand struct {
func New(command string, argv []string, options ...Option) (*LocalCommand, error) {
cmd := exec.Command(command, argv...)

cmd.Env = append(os.Environ(), "TERM=xterm-256color")

pty, err := pty.Start(cmd)
if err != nil {
// todo close cmd?
Expand Down

0 comments on commit 11396d7

Please sign in to comment.