Skip to content

Commit

Permalink
Add suport for "standard" NO_COLOR env variable (#508)
Browse files Browse the repository at this point in the history
  • Loading branch information
leovilok authored Apr 5, 2020
1 parent 6d13fce commit f14fb9c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions nnn.1
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,8 @@ separated by \fI;\fR:
.Pp
\fBnnn:\fR this is a special variable set to the hovered entry before executing
a command from the command prompt or spawning a shell.
.Pp
\fBNO_COLOR:\fR if defined, disable ANSI color output.
.Sh KNOWN ISSUES
.Nm
may not handle keypresses correctly when used with tmux (see issue #104 for
Expand Down
2 changes: 1 addition & 1 deletion src/nnn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1524,7 +1524,7 @@ static bool initcurses(void *oldmask)
#endif
curs_set(FALSE); /* Hide cursor */

if (!(g_states & STATE_NOCOLOR)) {
if (!(g_states & STATE_NOCOLOR || getenv("NO_COLOR"))) {
start_color();
use_default_colors();

Expand Down

0 comments on commit f14fb9c

Please sign in to comment.