summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-01-11 00:45:19 +0100
committerhut <hut@lavabit.com>2010-01-11 00:45:19 +0100
commit20f5182fc5c707321e0836be9ee81a2d68dcf4cd (patch)
tree49632100a774b4cc894711512dc7e24c6bdeae47
parent9983328cebc02a0e01038880405d061448abcac7 (diff)
downloadranger-20f5182fc5c707321e0836be9ee81a2d68dcf4cd.tar.gz
commands: cleanup, extended docstring
-rw-r--r--ranger/commands.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/ranger/commands.py b/ranger/commands.py
index 8d71b3eb..a62caf60 100644
--- a/ranger/commands.py
+++ b/ranger/commands.py
@@ -174,6 +174,7 @@ class cd(Command):
 		abs_dest = normpath(join(pwd, rel_dest))
 		return rel_dest != '.' and isdir(abs_dest)
 
+
 class find(Command):
 	"""
 	:find <string>
@@ -184,6 +185,7 @@ class find(Command):
 	In the quick command console, once there is one unambiguous match,
 	the file will be run automatically.
 	"""
+
 	count = 0
 	def execute(self):
 		if self.mode != cmode.COMMAND_QUICK:
@@ -234,6 +236,7 @@ class quit(Command):
 	
 	Quits the program immediately.
 	"""
+
 	def execute(self):
 		raise SystemExit
 
@@ -248,6 +251,7 @@ class delete(Command):
 	can mark files with space or v). If there are no marked files,
 	use the "current file" (where the cursor is)
 	"""
+
 	def execute(self):
 		self.fm.delete()
 
@@ -258,6 +262,7 @@ class mkdir(Command):
 
 	Creates a directory with the name <dirname>.
 	"""
+
 	def execute(self):
 		line = parse(self.line)
 		try:
@@ -272,6 +277,7 @@ class rename(Command):
 
 	Changes the name of the currently highlighted file to <newname>
 	"""
+
 	def execute(self):
 		line = parse(self.line)
 		self.fm.rename(self.fm.env.cf, line.rest(1))
@@ -285,7 +291,14 @@ class chmod(Command):
 	:chmod <octal number>
 
 	Sets the permissions of the selection to the octal number.
+
+	The octal number is between 0 and 777. The digits specify the
+	permissions for the user, the group and others.
+
+	A 1 permits execution, a 2 permits writing, a 4 permits reading.
+	Add those numbers to combine them. So a 7 permits everything.
 	"""
+
 	def execute(self):
 		line = parse(self.line)
 		mode = line.rest(1)
@@ -311,12 +324,14 @@ class chmod(Command):
 		except:
 			pass
 
+
 class filter(Command):
 	"""
 	:filter <string>
 
 	Displays only the files which contain <string> in their basename.
 	"""
+
 	def execute(self):
 		line = parse(self.line)
 		self.fm.set_filter(line.rest(1))
@@ -328,6 +343,7 @@ class grep(Command):
 
 	Looks for a string in all marked files or directories
 	"""
+
 	def execute(self):
 		from ranger.applications import run
 		line = parse(self.line)
ranger/blame/doc/ranger.1?h=v1.4.2&id=f043233d33a06bc083d40ed9978a4855807f8d63'>^
85a9a41e ^
dd91e084 ^


















85a9a41e ^





af4bcb88 ^


dd91e084 ^












































85a9a41e ^






6c474705 ^
1ee34606 ^

85a9a41e ^






dd91e084 ^


































aefd8048 ^
a2853ab6 ^
dd91e084 ^





a2853ab6 ^
acf16d12 ^

a2853ab6 ^
dd91e084 ^
























acf16d12 ^

dd91e084 ^

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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225