| `NNN_OPENER=mimeopen` | custom file opener |
| `NNN_IDLE_TIMEOUT=300` | idle seconds before locking terminal [default: disabled] |
| `NNN_COPIER=copier` | clipboard copier script [default: none] |
-| `NNN_NO_AUTOSELECT=1` | do not auto-select matching dir in _nav-as-you-type_ mode |
| `NNN_TRASH=1` | trash files to the desktop Trash [default: delete] |
| `NNN_OPS_PROG=1` | show copy, move progress on Linux |
```
usage: nnn [-b key] [-d] [-e] [-H] [-i] [-n] [-o]
- [-p file] [-s] [-S] [-v] [-w] [-h] [PATH]
+ [-p file] [-s] [-S] [-t] [-v] [-w] [-h] [PATH]
The missing terminal file manager for X.
-p file selection file (stdout if '-')
-s string filters [default: regex]
-S du mode
+ -t disable dir auto-select
-v show version
-w wild load
-h show help
In this mode directories are opened in filter mode, allowing continuous navigation. Works best with the **arrow keys**.
-When there's a unique match and it's a directory, `nnn` auto selects the directory and enters it in this mode. To disable this behaviour,
-
- export NNN_NO_AUTOSELECT=1
+When there's a unique match and it's a directory, `nnn` auto selects the directory and enters it in this mode. Use the relevant program option to disable this behaviour.
This mode takes navigation to the next level when short, unique keypress sequences are possible. For example, to reach `nnn` development directory (located at `~/GitHub/nnn`) from my `$HOME` (which is the default directory the terminal starts in), I use the sequence <kbd>g</kbd><kbd>n</kbd>.
complete -c nnn -s p -r -d 'copy selection to file'
complete -c nnn -s s -d 'use substring match for filters'
complete -c nnn -s S -d 'start in disk usage analyzer mode'
+complete -c nnn -s t -d 'disable dir auto-select'
complete -c nnn -s v -d 'show program version and exit'
complete -c nnn -s w -d 'wild load'
complete -c nnn -s h -d 'show program help'
'(-p)-p[copy selection to file]:file name'
'(-s)-s[use substring match for filters]'
'(-S)-S[start in disk usage analyzer mode]'
+ '(-t)-t[disable dir auto-select]'
'(-v)-v[show program version and exit]'
'(-w)-w[wild load]'
'(-h)-h[show program help]'
.Fl S
start in disk usage analyzer mode
.Pp
+.Fl t
+ disable directory auto-select in navigate-as-you-type mode
+.Pp
.Fl v
show version and exit
.Pp
.Pp
\fBNNN_COPIER:\fR system clipboard copier script. The project page has some sample copier scripts.
.Pp
-\fBNNN_NO_AUTOSELECT:\fR disable directory auto-selection in \fInavigate-as-you-type\fR mode.
-.Bd -literal
- export NNN_NO_AUTOSELECT=1
-.Ed
-.Pp
\fBNNN_TRASH:\fR trash (instead of \fIdelete\fR) files to desktop Trash.
.Bd -literal
export NNN_TRASH=1
#define NNN_NOTE 5
#define NNNLVL 6 /* strings end here */
#define NNN_USE_EDITOR 7 /* flags begin here */
-#define NNN_NO_AUTOSELECT 8
-#define NNN_TRASH 9
+#define NNN_TRASH 8
#ifdef __linux__
-#define NNN_OPS_PROG 10
+#define NNN_OPS_PROG 9
#endif
static const char * const env_cfg[] = {
"NNN_NOTE",
"NNNLVL",
"NNN_USE_EDITOR",
- "NNN_NO_AUTOSELECT",
"NNN_TRASH",
#ifdef __linux__
"NNN_OPS_PROG",
{
fprintf(stdout,
"%s: nnn [-b key] [-d] [-e] [-H] [-i] [-n] [-o]\n"
- " [-p file] [-s] [-S] [-v] [-w] [-h] [PATH]\n\n"
+ " [-p file] [-s] [-S] [-t] [-v] [-w] [-h] [PATH]\n\n"
"The missing terminal file manager for X.\n\n"
"positional args:\n"
" PATH start dir [default: current dir]\n\n"
" -p file selection file (stdout if '-')\n"
" -s string filters [default: regex]\n"
" -S du mode\n"
+ " -t disable dir auto-select\n"
" -v show version\n"
" -w wild load\n"
" -h show help\n\n"
char *arg = NULL;
int opt;
- while ((opt = getopt(argc, argv, "HSib:denop:svwh")) != -1) {
+ while ((opt = getopt(argc, argv, "HSib:denop:stvwh")) != -1) {
switch (opt) {
case 'S':
cfg.blkorder = 1;
cfg.filter_re = 0;
filterfn = &visible_str;
break;
+ case 't':
+ cfg.autoselect = 0;
+ break;
case 'v':
fprintf(stdout, "%s\n", VERSION);
return _SUCCESS;
/* Get the clipboard copier, if set */
copier = getenv(env_cfg[NNN_COPIER]);
- /* Disable auto-select if opted */
- if (xgetenv_set(env_cfg[NNN_NO_AUTOSELECT]))
- cfg.autoselect = 0;
-
#ifdef __linux__
if (!xgetenv_set(env_cfg[NNN_OPS_PROG])) {
cp[5] = cp[4];