From 08520ac80ee762c390dce35e503b046af8fab216 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Fri, 11 Jan 2019 22:15:51 +0530 Subject: [PATCH] Rename config env var --- README.md | 2 +- nnn.1 | 4 ++-- src/nnn.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c8ecfdba..793ccced 100644 --- a/README.md +++ b/README.md @@ -536,7 +536,7 @@ By default in OpenBSD & FreeBSD, `stty` maps ^Y to `DSUSP`. This mean In order to disable opening files on accidental navigation key ( or l) press: - export DISABLE_FILE_OPEN_ON_NAV=1 + export NNN_NO_FILE_OPEN_ON_NAV=1 Use Enter to open files. diff --git a/nnn.1 b/nnn.1 index 4a824a1f..afefc08f 100644 --- a/nnn.1 +++ b/nnn.1 @@ -305,9 +305,9 @@ files. export NNN_NO_AUTOSELECT=1 .Ed .Pp -\fBDISABLE_FILE_OPEN_ON_NAV:\fR disable file open on \fBRight\fR or \fBl\fR keys (\fBEnter\fR opens files). +\fBNNN_NO_FILE_OPEN_ON_NAV:\fR disable file open on \fBRight\fR or \fBl\fR keys (\fBEnter\fR opens files). .Bd -literal - export DISABLE_FILE_OPEN_ON_NAV=1 + export NNN_NO_FILE_OPEN_ON_NAV=1 .Ed .Pp \fBNNN_RESTRICT_0B:\fR restrict opening 0-byte files due to unexpected behaviour; use \fIedit\fR or \fIopen with\fR to open the file. diff --git a/src/nnn.c b/src/nnn.c index 1cdaa569..76e448e7 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -2161,8 +2161,8 @@ static bool show_help(char *path) dprintf(fd, "NNN_SHOW_HIDDEN: 1\n"); if (getenv("NNN_NO_AUTOSELECT")) dprintf(fd, "NNN_NO_AUTOSELECT: 1\n"); - if (getenv("DISABLE_FILE_OPEN_ON_NAV")) - dprintf(fd, "DISABLE_FILE_OPEN_ON_NAV: 1\n"); + if (getenv("NNN_NO_FILE_OPEN_ON_NAV")) + dprintf(fd, "NNN_NO_FILE_OPEN_ON_NAV: 1\n"); dprintf(fd, "\n"); @@ -3778,7 +3778,7 @@ int main(int argc, char *argv[]) cfg.autoselect = 0; /* Disable opening files on right arrow and `l` */ - if (getenv("DISABLE_FILE_OPEN_ON_NAV")) + if (getenv("NNN_NO_FILE_OPEN_ON_NAV")) cfg.nonavopen = 1; /* Restrict opening of 0-byte files */