]> Cypherpunks repositories - gostls13.git/commit
cmd/pprof: disable readline UI support for TERM=dumb
authorHana (Hyang-Ah) Kim <hyangah@gmail.com>
Tue, 10 Jul 2018 04:44:21 +0000 (00:44 -0400)
committerHyang-Ah Hana Kim <hyangah@gmail.com>
Wed, 11 Jul 2018 01:08:56 +0000 (01:08 +0000)
commit5e70b132c22d10e556b3840626a50ecf1dcad35f
tree2ff166b3b493dd4f648774ca8f76a9ad1c146e4e
parent8d6fc84986cc0cb0bf77503828a2e7740f8ccac1
cmd/pprof: disable readline UI support for TERM=dumb

In general, dumb terminal indicates terminal with limited capability.
It may provide no support for special character sequences, e.g., no
handling of ANSI escape sequences. Its input/output handling behavior
may deviate from what's described in termios or terminfo. E.g., in
the shell in emacs, even after successfully setting the terminal to
raw mode, the terminal behaves as if it's still operating in canonical
mode since emacs is doing input processing first.

Readline support can be broken in various ways in dumb terminal mode,
so we want to disable readline or advanced UI features. The easiest
way to detect dumb terminal is to check the environment variable "TERM".

Fixes #26254

Change-Id: I6b652eb555bc03b84405aae08b0b25d111fbb8b0
Reviewed-on: https://go-review.googlesource.com/122879
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/pprof/readlineui.go