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']))
2022-08-14 09:17:53 -0700 committer Kartik K. Agaram <vc@akkartik.com> 2022-08-14 09:20:14 -0700 new fork: rip out drawing support' href='/akkartik/text.love/commit/README.md?id=9d792a203bb00b0f5521698fd1c6890f0cc12032'>9d792a2 ^
f0e967d ^

9d792a2 ^
f0e967d ^







482d077 ^
44aa822 ^
42762ce ^
f0e967d ^
9d792a2 ^
1e33eee ^
7be2718 ^
1e33eee ^
53def09 ^
96df187 ^
61845c3 ^
96df187 ^
6667c37 ^

66b17d7 ^
9d792a2 ^
d043745 ^
d202e2c ^


0218980 ^



ac83252 ^


f0e967d ^
b210ce7 ^
42762ce ^
f0e967d ^

59fb670 ^

9d792a2 ^
cad09c0 ^
9d792a2 ^



9d792a2 ^
25939e8 ^

9d792a2 ^
826207a ^
9d792a2 ^
826207a ^
25939e8 ^
e207785 ^
25939e8 ^
42762ce ^
25939e8 ^
938cd6b ^

25939e8 ^
938cd6b ^
25939e8 ^
938cd6b ^
826207a ^
f0e967d ^


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