diff options
-rw-r--r-- | ranger/core/actions.py | 4 | ||||
-rw-r--r-- | ranger/defaults/keys.py | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py index b61e514b..96e23189 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -426,6 +426,10 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware): fnc = lambda item: item.mimetype elif order == 'ctime': fnc = lambda item: -int(item.stat and item.stat.st_ctime) + elif order == 'atime': + fnc = lambda item: -int(item.stat and item.stat.st_atime) + elif order == 'mtime': + fnc = lambda item: -int(item.stat and item.stat.st_mtime) lst.sort(key=fnc) cwd.set_cycle_list(lst) return cwd.cycle(forward=None) diff --git a/ranger/defaults/keys.py b/ranger/defaults/keys.py index e8acebb7..14ecef54 100644 --- a/ranger/defaults/keys.py +++ b/ranger/defaults/keys.py @@ -311,9 +311,11 @@ map('n', fm.search()) map('N', fm.search(forward=False)) map('c<bg>', fm.hint('*w*:rename ch*d*ir *search order:* ' \ - '*c*time *m*imetype *s*ize *t*ag')) + '*a*time *c*time *M*time *m*imetype *s*ize *t*ag')) map('ct', fm.search(order='tag')) map('cc', fm.search(order='ctime')) +map('ca', fm.search(order='atime')) +map('cM', fm.search(order='mtime')) map('cm', fm.search(order='mimetype')) map('cs', fm.search(order='size')) |