| `NNN_IDLE_TIMEOUT=300` | idle seconds before locking terminal [default: disabled] |
| `NNN_COPIER=copier` | clipboard copier script [default: none] |
| `NNN_TRASH=1` | trash files to the desktop Trash [default: delete] |
-| `NNN_OPS_PROG=1` | show cp, mv progress on Linux (needs advcpmv) |
#### Cmdline options
```
usage: nnn [-b key] [-d] [-e] [-H] [-i] [-n] [-o]
- [-p file] [-s] [-S] [-t] [-v] [-h] [PATH]
+ [-p file] [-r] [-s] [-S] [-t] [-v] [-h] [PATH]
The missing terminal file manager for X.
-n version sort
-o press Enter to open files
-p file selection file (stdout if '-')
+ -r show cp, mv progress on Linux
-s string filters [default: regex]
-S du mode
-t disable dir auto-select
complete -c nnn -s n -d 'use version compare to sort files'
complete -c nnn -s o -d 'open files only on Enter'
complete -c nnn -s p -r -d 'copy selection to file'
+complete -c nnn -s r -d 'show cp, mv progress (Linux-only)'
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'
'(-n)-n[use version compare to sort files]'
'(-o)-o[open files only on Enter]'
'(-p)-p[copy selection to file]:file name'
+ '(-r)-r[show cp, mv progress (Linux-only)]'
'(-s)-s[use substring match for filters]'
'(-S)-S[start in disk usage analyzer mode]'
'(-t)-t[disable dir auto-select]'
.Op Ar -i
.Op Ar -n
.Op Ar -p file
+.Op Ar -r
.Op Ar -s
.Op Ar -S
.Op Ar -v
.Fl "p file"
copy (or \fIpick\fR) selection to file, or stdout if file='-'
.Pp
+.Fl r
+ show cp, mv progress (Linux-only, needs advcpmv; '^T' shows the progress on BSD/macOS)
+.Pp
.Fl s
use substring match for filters instead of regex
.Pp
.Bd -literal
export NNN_TRASH=1
.Ed
-.Pp
-\fBNNN_OPS_PROG:\fR show progress of copy, move operations (Linux-only, needs advcpmv).
-.Bd -literal
- export NNN_OPS_PROG=1
-
- NOTE: BSD and macOS users can press '^T' to check the progress.
-.Ed
.Sh KNOWN ISSUES
If you are using urxvt you might have to set backspace key to DEC.
.Sh AUTHORS
#define NNNLVL 6 /* strings end here */
#define NNN_USE_EDITOR 7 /* flags begin here */
#define NNN_TRASH 8
-#ifdef __linux__
-#define NNN_OPS_PROG 9
-#endif
static const char * const env_cfg[] = {
"NNN_BMS",
"NNNLVL",
"NNN_USE_EDITOR",
"NNN_TRASH",
-#ifdef __linux__
- "NNN_OPS_PROG",
-#endif
};
/* Required environment variables */
{
fprintf(stdout,
"%s: nnn [-b key] [-d] [-e] [-H] [-i] [-n] [-o]\n"
- " [-p file] [-s] [-S] [-t] [-v] [-h] [PATH]\n\n"
+ " [-p file] [-r] [-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"
" -n version sort\n"
" -o press Enter to open files\n"
" -p file selection file (stdout if '-')\n"
+ " -r show cp, mv progress on Linux\n"
" -s string filters [default: regex]\n"
" -S du mode\n"
" -t disable dir auto-select\n"
{
char *arg = NULL;
int opt;
+#ifdef __linux__
+ bool progress = FALSE;
+#endif
- while ((opt = getopt(argc, argv, "HSib:denop:stvh")) != -1) {
+ while ((opt = getopt(argc, argv, "HSib:denop:rstvh")) != -1) {
switch (opt) {
case 'S':
cfg.blkorder = 1;
unlink(g_cppath);
}
break;
+ case 'r':
+#ifdef __linux__
+ progress = TRUE;
+#endif
+ break;
case 's':
cfg.filter_re = 0;
filterfn = &visible_str;
copier = getenv(env_cfg[NNN_COPIER]);
#ifdef __linux__
- if (!xgetenv_set(env_cfg[NNN_OPS_PROG])) {
+ if (!progress) {
cp[5] = cp[4];
cp[2] = cp[4] = ' ';