Commandline client ignores TERM environment variable
- Dominant language
- Go
- Stars
- 9.2k
- Forks
- 1.3k
- Avg merge
- 12h 58m
- Merged PRs (30d)
- 56
Description
The commandline client doesn't use terminfo for determining how to control terminal colours. This causes problems with terminals which use different control codes, or doesn't support controls at all.
To reproduce, simply type:
```
TERM=dumb keybase id
```
The output is still coloured, which is not to be expected if terminfo is used to determine the control codes.
A related problem is that the commandlne tool outputs colour controls even if the output is not directed to a terminal:
```
$ keybase id 2> foo
$ less foo
...
✔ ESC[32mpublic key fingerprint ... ESC[39m
...
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the command-line handling for the `keybase id` entry point and inspect how TERM and output destination affect colour controls. Reproduce with `TERM=dumb keybase id`, then redirect output and inspect it with `less`. Done means unsupported terminal modes and non-terminal output no longer receive inappropriate colour controls.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100