diff options
author | hut <hut@lavabit.com> | 2011-08-26 12:05:26 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2011-08-26 12:05:26 +0200 |
commit | 1b0782bbe6c5922d002a21644893f303e6c34ed2 (patch) | |
tree | 7751788feec5057bfbd3f9d26c40c245b3b85461 | |
parent | b441d4b3147c9399d7452074297c2a10d7f899ba (diff) | |
download | ranger-1b0782bbe6c5922d002a21644893f303e6c34ed2.tar.gz |
defaults/keys: added sorting by atime
I see no use in that, but this feature was requested
-rw-r--r-- | ranger/defaults/keys.py | 3 | ||||
-rw-r--r-- | ranger/fsobject/directory.py | 1 |
2 files changed, 3 insertions, 1 deletions
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<bg>', 'O<bg>', 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 '', } |