summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/defaults/keys.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/ranger/defaults/keys.py b/ranger/defaults/keys.py
index e5f120cf..88d61ee4 100644
--- a/ranger/defaults/keys.py
+++ b/ranger/defaults/keys.py
@@ -196,19 +196,23 @@ map('ud', 'uy', fm.uncut())
 # ------------------------------------ changing of file permissions
 # type "+ow" for "chmod o+w %s" and so on
 from itertools import product
+octal_help    = 'Enter the octal mode number for chmod'
+symbolic_help = '%s %s to *r*ead, *w*rite, e*x*ecute'
 for mode in product('ugoa', 'rwxXst'):
 	map('-%s%s' % mode, fm.execute_console('shell chmod %s-%s %%s' % mode))
 	map('+%s%s' % mode, fm.execute_console('shell chmod %s+%s %%s' % mode))
-	map('=%s%s' % mode, fm.execute_console('shell chmod %s+%s %%s' % mode))
+for n in product(range(8), range(8), range(8)):
+	map('=%d%d%d' % n, fm.execute_console('shell chmod %d%d%d %%s' % n))
+	map('=%d<bg>'   %  n[0],        fm.hint(octal_help))
+	map('=%d%d<bg>' % (n[0], n[1]), fm.hint(octal_help))
 
 # hints:
-template = '%s %s to *r*ead, *w*rite, e*x*ecute'
 for who, name in zip('ugoa', ('user', 'group', 'others', 'all')):
-	map('-%s<bg>' % who, fm.hint(template % ('forbid', name)))
-	map('+%s<bg>' % who, fm.hint(template % ('allow', name)))
-	map('=%s<bg>' % who, fm.hint(template % ('allow', name)))
+	map('-%s<bg>' % who, fm.hint(symbolic_help % ('forbid', name)))
+	map('+%s<bg>' % who, fm.hint(symbolic_help % ('allow', name)))
 map('-<bg>', '+<bg>', '=<bg>', fm.hint('change permission for *u*ser, '
 	'*g*roup, *o*thers, *a*ll'))
+map('=<bg>', fm.hint(octal_help))
 
 # ---------------------------------------------------- run programs
 map('S', fm.execute_command(os.environ['SHELL']))
or nfnty <git@nfnty.se> 2017-04-12 03:12:42 +0200 committer nfnty <git@nfnty.se> 2017-04-12 03:20:21 +0200 setup.py: Make executables executable' href='/akspecs/ranger/commit/setup.py?id=20f0f2ba96a4a9dcbb8beffbee957b42157d4efd'>20f0f2ba ^
6fc14005 ^
144de554 ^
20f0f2ba ^
6fc14005 ^
20f0f2ba ^


d8b807c5 ^

1a6d1846 ^
d4598be6 ^
8a5944e1 ^
3cd8a402 ^
b3d031a9 ^
397106b6 ^
d8b807c5 ^



397106b6 ^
d8b807c5 ^


397106b6 ^

d8b807c5 ^

397106b6 ^
d8b807c5 ^
397106b6 ^

31277e06 ^

20f0f2ba ^












144de554 ^


d1a1173d ^





03dae5f0 ^
fc5648cd ^





















144de554 ^
20f0f2ba ^

397106b6 ^



3b96a37f ^
6bc13af0 ^







4cefa8cc ^
6bc13af0 ^



1a6d1846 ^



3cd8a402 ^
76791a70 ^

6bc13af0 ^

76791a70 ^


6bc13af0 ^







fe5f90d3 ^
6bc13af0 ^



144de554 ^



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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147