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' -a '-\tstdout'
+complete -c nnn -s Q -d 'disable quit confirmation'
complete -c nnn -s r -d 'show cp, mv progress (Linux-only)'
complete -c nnn -s R -d 'disable rollover at edges'
complete -c nnn -s S -d 'start in disk usage analyzer mode'
'(-n)-n[use version compare to sort files]'
'(-o)-o[open files only on Enter]'
'(-p)-p[copy selection to file]:file name'
+ '(-Q)-Q[disable quit confirmation]'
'(-r)-r[show cp, mv progress (Linux-only)]'
'(-R)-R[disable rollover at edges]'
'(-S)-S[start in disk usage analyzer mode]'
.Op Ar -K
.Op Ar -n
.Op Ar -p file
+.Op Ar -Q
.Op Ar -r
.Op Ar -R
.Op Ar -S
.Fl "p file"
copy (or \fIpick\fR) selection to file, or stdout if file='-'
.Pp
+.Fl Q
+ disable confirmation when quitting program with multiple active contexts
+.Pp
.Fl r
show cp, mv progress (Linux-only, needs advcpmv; '^T' shows the progress on BSD/macOS)
.Pp
uint selmode : 1; /* Set when selecting files */
uint showdetail : 1; /* Clear to show fewer file info */
uint ctxactive : 1; /* Context active or not */
- uint reserved : 3;
+ uint reserved : 2;
/* The following settings are global */
+ uint forcequit : 1; /* Do not confirm when quitting program */
uint curctx : 2; /* Current context number */
uint dircolor : 1; /* Current status of dir color */
uint picker : 1; /* Write selection to user-specified file */
0, /* showdetail */
1, /* ctxactive */
0, /* reserved */
+ 0, /* forcequit */
0, /* curctx */
0, /* dircolor */
0, /* picker */
setdirwatch();
goto begin;
}
- } else {
+ } else if (!cfg.forcequit) {
for (r = 0; r < CTX_MAX; ++r)
if (r != cfg.curctx && g_ctx[r].c_cfg.ctxactive) {
r = get_input(messages[MSG_QUIT_ALL]);
" -n version sort\n"
" -o open files on Enter\n"
" -p file selection file [stdout if '-']\n"
+ " -Q no quit confirmation\n"
" -r use advcpmv patched cp, mv\n"
- " -R disable rollover at edges\n"
+ " -R no rollover at edges\n"
" -S du mode\n"
- " -t disable dir auto-select\n"
+ " -t no dir auto-select\n"
" -v show version\n"
" -x notis, sel to system clipboard\n"
" -h show help\n\n"
bool progress = FALSE;
#endif
- while ((opt = getopt(argc, argv, "HSKiab:cde:Egnop:rRtvxh")) != -1) {
+ while ((opt = getopt(argc, argv, "HSKiab:cde:Egnop:QrRtvxh")) != -1) {
switch (opt) {
case 'S':
cfg.blkorder = 1;
unlink(g_selpath);
}
break;
+ case 'Q':
+ cfg.forcequit = 1;
+ break;
case 'r':
#ifdef __linux__
progress = TRUE;