Skip to content

Commit

Permalink
Set "color" to true or false
Browse files Browse the repository at this point in the history
  • Loading branch information
xyproto committed Jan 14, 2024
1 parent d11f368 commit 13c0473
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,11 +528,11 @@ int main(int argc, char* argv[])
exit_with_usage();
}
if (!strncmp(pw, "always", 6)) {
color = 1;
color = true;
} else if (!strncmp(pw, "never", 5)) {
color = 0;
color = false;
} else if (!strncmp(pw, "auto", 4)) {
color = isatty(STDOUT_FILENO);
color = isatty(STDOUT_FILENO) != 0;
} else {
exit_with_usage();
}
Expand Down

0 comments on commit 13c0473

Please sign in to comment.