Skip to content
Myr

Respect $NO_COLOR environment variable

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Close #1762

authored by Junegunn Choi · committed by Junegunn Choi · parent 04db440 · Browse files · 2 files+9 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+9 added−2 removed

  • other:+9 added−2 removed

2 files+9 added−2 removed

modified:man/man1/fzf.1+1 added-1 removed
480 unmodified lines
481color mappings.482483.RS484.B BASE SCHEME:485 (default: dark on 256-color terminal, otherwise 16)485 (default: \fBdark\fR on 256-color terminal, otherwise \fB16\fR; If \fBNO_COLOR\fR is set, \fBbw\fR)486487 \fBdark \fRColor scheme for dark 256-color terminal488 \fBlight \fRColor scheme for light 256-color terminal489 \fB16 \fRColor scheme for 16-color terminal
1113 unmodified lines
modified:src/options.go+8 added-1 removed
479 unmodified lines
480 return previewOpts{command, posRight, sizeSpec{50, true}, "", false, false, false, false, tui.DefaultBorderShape, 0, 0, nil}481}482483func defaultOptions() *Options {484 var theme *tui.ColorTheme485 if os.Getenv("NO_COLOR") != "" {486 theme = tui.NoColorTheme()487 } else {488 theme = tui.EmptyTheme()489 }490491 return &Options{492 Bash: false,493 Zsh: false,494 Fish: false,
13 unmodified lines
508 Criteria: []criterion{byScore, byLength},509 Multi: 0,510 Ansi: false,511 Mouse: true,505 Theme: tui.EmptyTheme(),512 Theme: theme,513 Black: false,514 Bold: true,515 MinHeight: 10,516 Layout: layoutDefault,
2266 unmodified lines