From 1b0782bbe6c5922d002a21644893f303e6c34ed2 Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 26 Aug 2011 12:05:26 +0200 Subject: defaults/keys: added sorting by atime I see no use in that, but this feature was requested --- ranger/defaults/keys.py | 3 ++- ranger/fsobject/directory.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ranger/defaults/keys.py b/ranger/defaults/keys.py index 88d61ee4..e8acebb7 100644 --- a/ranger/defaults/keys.py +++ b/ranger/defaults/keys.py @@ -236,13 +236,14 @@ map('zf', fm.open_console('filter ')) # ------------------------------------------------------------ sort map('o', 'O', fm.hint('*sort by:* *s*ize *b*asename *m*time' \ - ' *c*time *t*ype *r*everse *n*atural')) + ' *c*time *a*time *t*ype *r*everse *n*atural')) sort_dict = { 's': 'size', 'b': 'basename', 'n': 'natural', 'm': 'mtime', 'c': 'ctime', + 'a': 'atime', 't': 'type', } diff --git a/ranger/fsobject/directory.py b/ranger/fsobject/directory.py index e0623e23..6d34b02d 100644 --- a/ranger/fsobject/directory.py +++ b/ranger/fsobject/directory.py @@ -88,6 +88,7 @@ class Directory(FileSystemObject, Accumulator, Loadable, SettingsAware): 'size': lambda path: -path.size, 'mtime': lambda path: -(path.stat and path.stat.st_mtime or 1), 'ctime': lambda path: -(path.stat and path.stat.st_ctime or 1), + 'atime': lambda path: -(path.stat and path.stat.st_atime or 1), 'type': lambda path: path.mimetype or '', } -- cgit 1.4.1-2-gfad0