Change env var name

This commit is contained in:
Arun Prakash Jana 2019-01-15 10:51:06 +05:30
parent c1668cb9dd
commit 389180d139
No known key found for this signature in database
GPG key ID: A75979F35C080412
3 changed files with 5 additions and 5 deletions

View file

@ -540,7 +540,7 @@ By default in OpenBSD & FreeBSD, `stty` maps <kbd>^Y</kbd> to `DSUSP`. This mean
In order to disable opening files on accidental navigation key (<kbd></kbd> or <kbd>l</kbd>) press: In order to disable opening files on accidental navigation key (<kbd></kbd> or <kbd>l</kbd>) press:
export NNN_NO_FILE_OPEN_ON_NAV=1 export NNN_RESTRICT_NAV_OPEN=1
Use <kbd>Enter</kbd> to open files. Use <kbd>Enter</kbd> to open files.

4
nnn.1
View file

@ -307,9 +307,9 @@ files.
export NNN_NO_AUTOSELECT=1 export NNN_NO_AUTOSELECT=1
.Ed .Ed
.Pp .Pp
\fBNNN_NO_FILE_OPEN_ON_NAV:\fR disable file open on \fBRight\fR or \fBl\fR keys (\fBEnter\fR opens files). \fBNNN_RESTRICT_NAV_OPEN:\fR disable file open on \fBRight\fR or \fBl\fR keys (\fBEnter\fR opens files).
.Bd -literal .Bd -literal
export NNN_NO_FILE_OPEN_ON_NAV=1 export NNN_RESTRICT_NAV_OPEN=1
.Ed .Ed
.Pp .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. \fBNNN_RESTRICT_0B:\fR restrict opening 0-byte files due to unexpected behaviour; use \fIedit\fR or \fIopen with\fR to open the file.

View file

@ -2171,7 +2171,7 @@ static bool show_help(char *path)
if (cfg.autoselect) if (cfg.autoselect)
dprintf(fd, "NNN_NO_AUTOSELECT: 1\n"); dprintf(fd, "NNN_NO_AUTOSELECT: 1\n");
if (cfg.nonavopen) if (cfg.nonavopen)
dprintf(fd, "NNN_NO_FILE_OPEN_ON_NAV: 1\n"); dprintf(fd, "NNN_RESTRICT_NAV_OPEN: 1\n");
if (cfg.restrict0b) if (cfg.restrict0b)
dprintf(fd, "NNN_RESTRICT_0B: 1\n"); dprintf(fd, "NNN_RESTRICT_0B: 1\n");
if (!cfg.filter_re) if (!cfg.filter_re)
@ -3791,7 +3791,7 @@ int main(int argc, char *argv[])
cfg.autoselect = 0; cfg.autoselect = 0;
/* Disable opening files on right arrow and `l` */ /* Disable opening files on right arrow and `l` */
if (getenv("NNN_NO_FILE_OPEN_ON_NAV")) if (getenv("NNN_RESTRICT_NAV_OPEN"))
cfg.nonavopen = 1; cfg.nonavopen = 1;
/* Restrict opening of 0-byte files */ /* Restrict opening of 0-byte files */