aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-03-05 20:45:07 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-03-05 20:45:07 +0530
commit1fbaa6105262d6b7449e426b01d7c4474d243318 (patch)
tree9243b513baa55395dc440fad224322afbc38c793 /src
parent020619d2b89ad4567e2a7de8590b9f82c8441bef (diff)
downloadnnn-1fbaa6105262d6b7449e426b01d7c4474d243318.tar.gz
Add option to clear sort order
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 7955723..59df132 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -551,7 +551,7 @@ static const char * const messages[] = {
"plugin keys:",
"bookmark keys:",
"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?",
"ignoring invalid paths...",
#ifndef DIR_LIMITED_SELECTION
@@ -4660,6 +4660,15 @@ static bool set_sort_flags(void)
entrycmpfn = &entrycmp;
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 */
cfg.apparentsz ^= 1;
if (cfg.apparentsz) {