Bläddra i källkod

Make NNN_COLORS override NO_COLORS (#515)

master
lvgx GitHub 5 år sedan
förälder
incheckning
a6cef2504c
Ingen känd nyckel hittad för denna signaturen i databasen GPG-nyckel ID: 4AEE18F83AFDEB23
2 ändrade filer med 7 tillägg och 3 borttagningar
  1. +1
    -1
      nnn.1
  2. +6
    -2
      src/nnn.c

+ 1
- 1
nnn.1 Visa fil

@@ -417,7 +417,7 @@ separated by \fI;\fR:
\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.
\fBNO_COLOR:\fR disable ANSI color output (overridden by \fBNNN_COLORS\fR).
.Sh KNOWN ISSUES
.Nm
may not handle keypresses correctly when used with tmux (see issue #104 for


+ 6
- 2
src/nnn.c Visa fil

@@ -1494,9 +1494,13 @@ static bool initcurses(void *oldmask)
#endif
curs_set(FALSE); /* Hide cursor */

if (!getenv("NO_COLOR")) {
char *colors = getenv(env_cfg[NNN_COLORS]);

if (colors || !getenv("NO_COLOR")) {
short i;
char *colors = xgetenv(env_cfg[NNN_COLORS], "4444");

if (!colors)
colors = "4444";

start_color();
use_default_colors();


Laddar…
Avbryt
Spara