summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-09-29 23:17:36 +0200
committerhut <hut@lavabit.com>2011-09-29 23:23:47 +0200
commit25e47de2051c5be62604d93cc1d27965263a8294 (patch)
tree0bd8eb401a41250b232931bf3342455f643feb4e
parentf491d57798601093c1ee353aa9943e995a1e5648 (diff)
downloadranger-25e47de2051c5be62604d93cc1d27965263a8294.tar.gz
core.actions: fixed cycling by atime and mtime
-rw-r--r--ranger/core/actions.py4
-rw-r--r--ranger/defaults/keys.py4
2 files changed, 7 insertions, 1 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index c8dffa55..163cc3d6 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -424,6 +424,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'))
 
a4174f13da9b430538564c68257b647'>5f3b3e7a ^
417a05ee ^
f15fcfe8 ^
417a05ee ^

a78deb23 ^
417a05ee ^
0c7f08ce ^

f15fcfe8 ^

0c7f08ce ^





417a05ee ^
be609279 ^
417a05ee ^


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106