diff options
-rw-r--r-- | man/man1/fzf.1 | 2 | ||||
-rw-r--r-- | src/options.go | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/man/man1/fzf.1 b/man/man1/fzf.1 index 41a6c22d..8f9c8611 100644 --- a/man/man1/fzf.1 +++ b/man/man1/fzf.1 @@ -482,7 +482,7 @@ color mappings. .RS .B BASE SCHEME: - (default: dark on 256-color terminal, otherwise 16) + (default: \fBdark\fR on 256-color terminal, otherwise \fB16\fR; If \fBNO_COLOR\fR is set, \fBbw\fR) \fBdark \fRColor scheme for dark 256-color terminal \fBlight \fRColor scheme for light 256-color terminal diff --git a/src/options.go b/src/options.go index 1f81b9de..669feef4 100644 --- a/src/options.go +++ b/src/options.go @@ -481,6 +481,13 @@ func defaultPreviewOpts(command string) previewOpts { } func defaultOptions() *Options { + var theme *tui.ColorTheme + if os.Getenv("NO_COLOR") != "" { + theme = tui.NoColorTheme() + } else { + theme = tui.EmptyTheme() + } + return &Options{ Bash: false, Zsh: false, @@ -502,7 +509,7 @@ func defaultOptions() *Options { Multi: 0, Ansi: false, Mouse: true, - Theme: tui.EmptyTheme(), + Theme: theme, Black: false, Bold: true, MinHeight: 10, |