diff options
author | Wojciech Siewierski <wojciech.siewierski@onet.pl> | 2015-01-29 14:25:33 +0100 |
---|---|---|
committer | Wojciech Siewierski <wojciech.siewierski@onet.pl> | 2015-01-29 14:30:55 +0100 |
commit | 361b26a30a000ff964c8e4b6598fe8423d2e4959 (patch) | |
tree | 1f8e21fc4c1f47357f42843dc44827207869d6d5 | |
parent | eb2c650f789295924b214f8358e94aa4156ddd32 (diff) | |
download | ranger-361b26a30a000ff964c8e4b6598fe8423d2e4959.tar.gz |
container.directory: added sorting by file extension
-rw-r--r-- | ranger/config/rc.conf | 2 | ||||
-rw-r--r-- | ranger/container/directory.py | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/ranger/config/rc.conf b/ranger/config/rc.conf index 687d591e..59237a59 100644 --- a/ranger/config/rc.conf +++ b/ranger/config/rc.conf @@ -399,6 +399,7 @@ map om chain set sort=mtime; set sort_reverse=False map oc chain set sort=ctime; set sort_reverse=False map oa chain set sort=atime; set sort_reverse=False map ot chain set sort=type; set sort_reverse=False +map oe chain set sort=extension; set sort_reverse=False map oS chain set sort=size; set sort_reverse=True map oB chain set sort=basename; set sort_reverse=True @@ -407,6 +408,7 @@ map oM chain set sort=mtime; set sort_reverse=True map oC chain set sort=ctime; set sort_reverse=True map oA chain set sort=atime; set sort_reverse=True map oT chain set sort=type; set sort_reverse=True +map oE chain set sort=extension; set sort_reverse=True map dc get_cumulative_size diff --git a/ranger/container/directory.py b/ranger/container/directory.py index 3a609cf6..63502ce9 100644 --- a/ranger/container/directory.py +++ b/ranger/container/directory.py @@ -110,6 +110,7 @@ class Directory(FileSystemObject, Accumulator, Loadable): 'atime': lambda path: -(path.stat and path.stat.st_atime or 1), 'random': lambda path: random.random(), 'type': lambda path: path.mimetype or '', + 'extension': lambda path: path.extension or '', } def __init__(self, path, **kw): |