mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Add option to clear sort order
This commit is contained in:
parent
020619d2b8
commit
1fbaa61052
11
src/nnn.c
11
src/nnn.c
|
@ -551,7 +551,7 @@ static const char * const messages[] = {
|
||||||
"plugin keys:",
|
"plugin keys:",
|
||||||
"bookmark keys:",
|
"bookmark keys:",
|
||||||
"invalid regex",
|
"invalid regex",
|
||||||
"'a'u / 'd'u / 'e'xtn / 'r'ev / 's'ize / 't'ime / 'v'er?",
|
"'a'u / 'd'u / 'e'xtn / 'r'ev / 's'ize / 't'ime / 'v'er / 'c'lear?",
|
||||||
"unmount failed! try lazy?",
|
"unmount failed! try lazy?",
|
||||||
"ignoring invalid paths...",
|
"ignoring invalid paths...",
|
||||||
#ifndef DIR_LIMITED_SELECTION
|
#ifndef DIR_LIMITED_SELECTION
|
||||||
|
@ -4660,6 +4660,15 @@ static bool set_sort_flags(void)
|
||||||
entrycmpfn = &entrycmp;
|
entrycmpfn = &entrycmp;
|
||||||
|
|
||||||
switch (r) {
|
switch (r) {
|
||||||
|
case 'c':
|
||||||
|
cfg.mtimeorder = 0;
|
||||||
|
cfg.sizeorder = 0;
|
||||||
|
cfg.apparentsz = 0;
|
||||||
|
cfg.blkorder = 0;
|
||||||
|
cfg.extnorder = 0;
|
||||||
|
entrycmpfn = &entrycmp;
|
||||||
|
namecmpfn = &xstricmp;
|
||||||
|
break;
|
||||||
case 'a': /* Apparent du */
|
case 'a': /* Apparent du */
|
||||||
cfg.apparentsz ^= 1;
|
cfg.apparentsz ^= 1;
|
||||||
if (cfg.apparentsz) {
|
if (cfg.apparentsz) {
|
||||||
|
|
Loading…
Reference in a new issue