mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
Remove another getenv() call
This commit is contained in:
parent
b60cf12760
commit
d080ba997d
13
src/nnn.c
13
src/nnn.c
|
@ -2328,20 +2328,19 @@ static bool show_help(char *path)
|
|||
dprintf(fd, "\n");
|
||||
}
|
||||
|
||||
for (i = NNN_OPENER; i <= NNN_TMPFILE; ++i) {
|
||||
for (i = NNN_OPENER; i <= NNN_PLAIN_FILTER; ++i) {
|
||||
start = getenv(env_cfg[i]);
|
||||
if (start)
|
||||
if (start) {
|
||||
if (i < NNN_USE_EDITOR)
|
||||
dprintf(fd, "%s: %s\n", env_cfg[i], start);
|
||||
else
|
||||
dprintf(fd, "%s: 1\n", env_cfg[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (g_cppath[0])
|
||||
dprintf(fd, "COPY FILE: %s\n", g_cppath);
|
||||
|
||||
for (i = NNN_USE_EDITOR; i <= NNN_PLAIN_FILTER; ++i) {
|
||||
if (getenv(env_cfg[i]))
|
||||
dprintf(fd, "%s: 1\n", env_cfg[i]);
|
||||
}
|
||||
|
||||
dprintf(fd, "\nv%s\n%s\n", VERSION, GENERAL_INFO);
|
||||
close(fd);
|
||||
|
||||
|
|
Loading…
Reference in a new issue