- Disk usage analyzer (block/apparent)
- File picker, (neo)vim plugin
- Navigation
- - *Navigate-as-you-type* with dir auto-select, *wild load*
+ - *Navigate-as-you-type* with dir auto-select
- 4 contexts (_aka_ tabs/workspaces)
- Bookmarks; pin and visit a directory
- Familiar, easy shortcuts (arrows, <kbd>~</kbd>, <kbd>-</kbd>, <kbd>@</kbd>)
```
usage: nnn [-b key] [-d] [-e] [-H] [-i] [-n] [-o]
- [-p file] [-s] [-S] [-t] [-v] [-w] [-h] [PATH]
+ [-p file] [-s] [-S] [-t] [-v] [-h] [PATH]
The missing terminal file manager for X.
-S du mode
-t disable dir auto-select
-v show version
- -w wild load
-h show help
```
^F Extract archive F List archive
e Edit in EDITOR p Open in PAGER
ORDER TOGGLES
- ^J du E Extn S Apparent du
- ^W Random s Size t Time modified
+ ^J du S Apparent du
+ s Size E Extn t Time modified
MISC
! ^] Shell L Lock C Execute entry
R ^V Pick plugin xK Run plugin key K
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>.
-The **_wild load_** option can be extremely handy for users who use this mode constantly. The entries are unsorted when the directory loads. Applying filters sorts the entries (with directories on top). Directory color is disabled in this mode.
-
#### File indicators
The following indicators are used in the detail view:
-S
-t
-v
- -w
-h
)
if [[ $prev == -b ]]; then
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'
'(-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]'
'*:filename:_files'
)
.Op Ar -s
.Op Ar -S
.Op Ar -v
-.Op Ar -w
.Op Ar -h
.Op Ar PATH
.Sh DESCRIPTION
.Fl v
show version and exit
.Pp
-.Fl w
- wild load - entries unsorted on directory load
-.Pp
.Fl h
show program help and exit
.Sh CONFIGURATION
allowing continuous navigation. Works best with the \fBarrow keys\fR.
.br
When there's a unique match and it's a directory, `nnn` auto selects the directory and enters it in this mode.
-.br
-The \fIwild load\fR option can be extremely handy for users who use the \fInavigate-as-you-type\fR mode constantly. The entries are unsorted when the directory loads. Applying filters sorts the entries (with directories on top). Directory color is disabled in this mode.
.Sh SELECTION
Use \fI^K\fR to select the file under the cursor.
.Pp
uint copymode : 1; /* Set when copying files */
uint showdetail : 1; /* Clear to show fewer file info */
uint ctxactive : 1; /* Context active or not */
- uint reserved : 7;
+ uint reserved : 8;
/* The following settings are global */
uint curctx : 2; /* Current context number */
uint dircolor : 1; /* Current status of dir color */
uint runplugin : 1; /* Choose plugin mode */
uint runctx : 2; /* The context in which plugin is to be run */
uint filter_re : 1; /* Use regex filters */
- uint wild : 1; /* Do not sort entries on dir load */
uint trash : 1; /* Move removed files to trash */
} settings;
0, /* runplugin */
0, /* runctx */
1, /* filter_re */
- 0, /* wild */
0, /* trash */
};
"b^F Extract archive F List archive\n"
"ce Edit in EDITOR p Open in PAGER\n"
"1ORDER TOGGLES\n"
- "b^J du E Extn S Apparent du\n"
- "b^W Random s Size t Time modified\n"
+ "b^J du S Apparent du\n"
+ "cs Size E Extn t Time modified\n"
"1MISC\n"
"9! ^] Shell L Lock C Execute entry\n"
"9R ^V Pick plugin xK Run plugin key K\n"
if (!ndents)
return;
- if (!cfg.wild)
- qsort(dents, ndents, sizeof(*dents), entrycmp);
+ qsort(dents, ndents, sizeof(*dents), entrycmp);
#ifdef DBGMODE
clock_gettime(CLOCK_REALTIME, &ts2);
} else
ncols -= 5;
- if (!cfg.wild) {
- attron(COLOR_PAIR(cfg.curctx + 1) | A_BOLD);
- cfg.dircolor = 1;
- }
+ attron(COLOR_PAIR(cfg.curctx + 1) | A_BOLD);
+ cfg.dircolor = 1;
/* Print listing */
for (i = curscroll; i < ndents && i < curscroll + onscreen; ++i) {
case SEL_ASIZE: // fallthrough
case SEL_BSIZE: // fallthrough
case SEL_EXTN: // fallthrough
- case SEL_MTIME: // fallthrough
- case SEL_WILD:
+ case SEL_MTIME:
switch (sel) {
case SEL_MFLTR:
cfg.filtermode ^= 1;
cfg.blkorder = 0;
cfg.extnorder = 0;
cfg.copymode = 0;
- cfg.wild = 0;
break;
case SEL_ASIZE:
cfg.apparentsz ^= 1;
cfg.sizeorder = 0;
cfg.extnorder = 0;
cfg.copymode = 0;
- cfg.wild = 0;
break;
case SEL_EXTN:
cfg.extnorder ^= 1;
cfg.apparentsz = 0;
cfg.blkorder = 0;
cfg.copymode = 0;
- cfg.wild = 0;
break;
- case SEL_MTIME:
+ default: /* SEL_MTIME */
cfg.mtimeorder ^= 1;
cfg.sizeorder = 0;
cfg.apparentsz = 0;
cfg.blkorder = 0;
cfg.extnorder = 0;
cfg.copymode = 0;
- cfg.wild = 0;
break;
- default: /* SEL_WILD */
- cfg.wild ^= 1;
- cfg.mtimeorder = 0;
- cfg.sizeorder = 0;
- cfg.apparentsz = 0;
- cfg.blkorder = 0;
- cfg.extnorder = 0;
- cfg.copymode = 0;
- setdirwatch();
- goto nochange;
}
/* Save current */
{
fprintf(stdout,
"%s: nnn [-b key] [-d] [-e] [-H] [-i] [-n] [-o]\n"
- " [-p file] [-s] [-S] [-t] [-v] [-w] [-h] [PATH]\n\n"
+ " [-p file] [-s] [-S] [-t] [-v] [-h] [PATH]\n\n"
"The missing terminal file manager for X.\n\n"
"positional args:\n"
" PATH start dir [default: current dir]\n\n"
" -S du mode\n"
" -t disable dir auto-select\n"
" -v show version\n"
- " -w wild load\n"
" -h show help\n\n"
"v%s\n%s\n", __func__, VERSION, GENERAL_INFO);
}
char *arg = NULL;
int opt;
- while ((opt = getopt(argc, argv, "HSib:denop:stvwh")) != -1) {
+ while ((opt = getopt(argc, argv, "HSib:denop:stvh")) != -1) {
switch (opt) {
case 'S':
cfg.blkorder = 1;
case 'v':
fprintf(stdout, "%s\n", VERSION);
return _SUCCESS;
- case 'w':
- cfg.wild = 1;
- break;
case 'h':
usage();
return _SUCCESS;
SEL_BSIZE, /* block size */
SEL_EXTN, /* order by extension */
SEL_MTIME,
- SEL_WILD,
SEL_REDRAW,
SEL_SEL,
SEL_SELMUL,
{ 'E', SEL_EXTN },
/* Toggle sort by time */
{ 't', SEL_MTIME },
- /* Wild load */
- { CONTROL('W'), SEL_WILD },
/* Redraw window */
{ CONTROL('L'), SEL_REDRAW },
/* Copy currently selected file path */