complete -c nnn -s S -d 'persistent session'
complete -c nnn -s t -r -d 'timeout in seconds to lock'
complete -c nnn -s T -r -d 'a d e r s t v'
-complete -c nnn -s u -d 'use selection (no prompt)'
complete -c nnn -s U -d 'show user and group'
complete -c nnn -s V -d 'show program version and exit'
complete -c nnn -s w -d 'hardware cursor mode'
'(-S)-S[persistent session]'
'(-t)-t[timeout to lock]:seconds'
'(-T)-T[a d e r s t v]:key'
- '(-u)-u[use selection (no prompt)]'
'(-U)-U[show user and group]'
'(-V)-V[show program version and exit]'
'(-w)-C[hardware cursor mode]'
uint_t reserved1 : 1;
/* The following settings are global */
uint_t curctx : 3; /* Current context number */
- uint_t prefersel : 1; /* Prefer selection over current, if exists */
- uint_t reserved2 : 1;
+ uint_t reserved2 : 2;
uint_t nonavopen : 1; /* Open file on right arrow or `l` */
uint_t autoselect : 1; /* Auto-select dir in type-to-nav mode */
uint_t cursormode : 1; /* Move hardware cursor with selection */
0, /* version */
0, /* reserved1 */
0, /* curctx */
- 0, /* prefersel */
0, /* reserved2 */
0, /* nonavopen */
1, /* autoselect */
#define MSG_FAILED 5
#define MSG_SSN_NAME 6
#define MSG_CP_MV_AS 7
-#define MSG_CUR_SEL_OPTS 8
+#define MSG_NOCHNAGE 8
#define MSG_FORCE_RM 9
#define MSG_LIMIT 10
#define MSG_NEW_OPTS 11
#define MSG_LAZY 38
#define MSG_FIRST 39
#define MSG_RM_TMP 40
-#define MSG_NOCHNAGE 41
#ifndef DIR_LIMITED_SELECTION
-#define MSG_DIR_CHANGED 42 /* Must be the last entry */
+#define MSG_DIR_CHANGED 41 /* Must be the last entry */
#endif
static const char * const messages[] = {
"failed!",
"session name: ",
"'c'p / 'm'v as?",
- "'c'urrent / 's'el?",
+ "unchanged",
"rm -rf %s file%s? [Esc cancels]",
"limit exceeded",
"'f'ile / 'd'ir / 's'ym / 'h'ard?",
"unmount failed! try lazy?",
"first file (\')/char?",
"remove tmp file?",
- "unchanged",
#ifndef DIR_LIMITED_SELECTION
"dir changed, range sel off", /* Must be the last entry */
#endif
static int get_cur_or_sel(void)
{
- if (selbufpos && ndents) {
- if (cfg.prefersel)
- return 's';
-
- int choice = get_input(messages[MSG_CUR_SEL_OPTS]);
-
- return ((choice == 'c' || choice == 's') ? choice : 0);
- }
-
if (selbufpos)
return 's';
#endif
" -t secs timeout to lock\n"
" -T key sort order [a/d/e/r/s/t/v]\n"
- " -u use selection (no prompt)\n"
#ifndef NOUG
" -U show user and group\n"
#endif
while ((opt = (env_opts_id > 0
? env_opts[--env_opts_id]
- : getopt(argc, argv, "aAb:cCdDeEfFgHJKl:nop:P:QrRs:St:T:uUVwxh"))) != -1) {
+ : getopt(argc, argv, "aAb:cCdDeEfFgHJKl:nop:P:QrRs:St:T:UVwxh"))) != -1) {
switch (opt) {
#ifndef NOFIFO
case 'a':
if (env_opts_id < 0)
sort = (uchar_t)optarg[0];
break;
- case 'u':
- cfg.prefersel = 1;
- break;
case 'U':
g_state.uidgid = 1;
break;