Skip to content

Commit

Permalink
Disabling term graphics
Browse files Browse the repository at this point in the history
  • Loading branch information
kenshaw committed May 11, 2024
1 parent f1ea8a3 commit 0eeab21
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions run.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,19 +237,21 @@ func Run(ctx context.Context, args *Args, connections map[string]interface{}, in
cygwin := isatty.IsCygwinTerminal(os.Stdout.Fd()) && isatty.IsCygwinTerminal(os.Stdin.Fd())
forceNonInteractive := len(args.CommandOrFiles) != 0

// enable term graphics
if !forceNonInteractive && interactive && !cygwin {
// NOTE: this is done here and not in the env.init() package, because
// NOTE: we need to determine if it is interactive first, otherwise it
// NOTE: could mess up the non-interactive output with control characters
var typ string
if s, _ := env.Getenv(text.CommandUpper()+"_TERM_GRAPHICS", "TERM_GRAPHICS"); s != "" {
typ = s
}
if err := env.Set("TERM_GRAPHICS", typ); err != nil {
return err
/*
// enable term graphics
if !forceNonInteractive && interactive && !cygwin {
// NOTE: this is done here and not in the env.init() package, because
// NOTE: we need to determine if it is interactive first, otherwise it
// NOTE: could mess up the non-interactive output with control characters
var typ string
if s, _ := env.Getenv(text.CommandUpper()+"_TERM_GRAPHICS", "TERM_GRAPHICS"); s != "" {
typ = s
}
if err := env.Set("TERM_GRAPHICS", typ); err != nil {
return err
}
}
}
*/

// configured named connections
for name, v := range connections {
Expand Down

0 comments on commit 0eeab21

Please sign in to comment.