|
|
@@ -4664,10 +4664,8 @@ static int handle_context_switch(enum action sel, char *newpath) |
|
|
|
return r; |
|
|
|
} |
|
|
|
|
|
|
|
static bool set_sort_flags(void) |
|
|
|
static bool set_sort_flags(int r) |
|
|
|
{ |
|
|
|
int r = get_input(messages[MSG_ORDER]); |
|
|
|
|
|
|
|
switch (r) { |
|
|
|
case 'a': /* Apparent du */ |
|
|
|
cfg.apparentsz ^= 1; |
|
|
@@ -5559,7 +5557,7 @@ nochange: |
|
|
|
cfg.blkorder = 0; |
|
|
|
continue; |
|
|
|
default: /* SEL_SORT */ |
|
|
|
if (!set_sort_flags()) { |
|
|
|
if (!set_sort_flags(get_input(messages[MSG_ORDER]))) { |
|
|
|
if (cfg.filtermode) |
|
|
|
presel = FILTER; |
|
|
|
printwait(messages[MSG_INVALID_KEY], &presel); |
|
|
@@ -6491,6 +6489,7 @@ static void usage(void) |
|
|
|
" -s name load session by name\n" |
|
|
|
" -S du mode\n" |
|
|
|
" -t secs timeout to lock\n" |
|
|
|
" -T key sort order [a/d/e/r/s/t/v]\n" |
|
|
|
" -v version sort\n" |
|
|
|
" -V show version\n" |
|
|
|
" -x notis, sel to system clipboard\n" |
|
|
@@ -6626,7 +6625,7 @@ int main(int argc, char *argv[]) |
|
|
|
{ |
|
|
|
char *arg = NULL; |
|
|
|
char *session = NULL; |
|
|
|
int opt; |
|
|
|
int opt, sort = 0; |
|
|
|
#ifndef NOMOUSE |
|
|
|
mmask_t mask; |
|
|
|
char *middle_click_env = xgetenv(env_cfg[NNN_MCLICK], "\0"); |
|
|
@@ -6640,7 +6639,7 @@ int main(int argc, char *argv[]) |
|
|
|
|
|
|
|
while ((opt = (env_opts_id > 0 |
|
|
|
? env_opts[--env_opts_id] |
|
|
|
: getopt(argc, argv, "aAb:cdeEgHKnop:QrRs:St:vVxh"))) != -1) { |
|
|
|
: getopt(argc, argv, "aAb:cdeEgHKnop:QrRs:St:T:vVxh"))) != -1) { |
|
|
|
switch (opt) { |
|
|
|
case 'a': |
|
|
|
cfg.mtime = 0; |
|
|
@@ -6724,6 +6723,10 @@ int main(int argc, char *argv[]) |
|
|
|
if (env_opts_id < 0) |
|
|
|
idletimeout = atoi(optarg); |
|
|
|
break; |
|
|
|
case 'T': |
|
|
|
if (env_opts_id < 0) |
|
|
|
sort = optarg[0]; |
|
|
|
break; |
|
|
|
case 'v': |
|
|
|
namecmpfn = &xstrverscasecmp; |
|
|
|
break; |
|
|
@@ -6938,6 +6941,9 @@ int main(int argc, char *argv[]) |
|
|
|
#endif |
|
|
|
return _FAILURE; |
|
|
|
|
|
|
|
if (sort) |
|
|
|
set_sort_flags(sort); |
|
|
|
|
|
|
|
opt = browse(initpath, session); |
|
|
|
|
|
|
|
#ifndef NOMOUSE |
|
|
|