Skip to content

Commit

Permalink
support $NO_COLOR
Browse files Browse the repository at this point in the history
  • Loading branch information
leahneukirchen committed Jan 29, 2018
1 parent a5dcf17 commit 8f0ac7c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lr.1
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ Don't enter directories.
.It Fl G
Colorize output to TTY.
Use twice to force colorized output.
If the environment variable
.Ev NO_COLOR
is set, colors are never used.
.It Fl X
Output OSC 8 hyperlinks to TTY.
Use twice to force hyperlinks.
Expand Down
2 changes: 2 additions & 0 deletions lr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2468,6 +2468,8 @@ main(int argc, char *argv[])
if (Xflag == 1)
Xflag = 0;
}
if (getenv("NO_COLOR"))
Gflag = 0;

analyze_format();
if (Uflag) {
Expand Down

0 comments on commit 8f0ac7c

Please sign in to comment.