summary refs log blame commit diff stats
path: root/doc/pydoc/ranger.commands.html
blob: d89a7ff3d1cbecd8aac26dbd5d49028f6274f012 (plain) (tree)
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
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430













































































































































































































































































































































































































































                                                                                                                                                                                                                                                                                                                                   
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module ranger.commands</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="ranger.html"><font color="#ffffff">ranger</font></a>.commands</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/hut/work/ranger/ranger/commands.py">/home/hut/work/ranger/ranger/commands.py</a></font></td></tr></table>
    <p></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="os.html">os</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="builtins.html#object">builtins.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="ranger.commands.html#parse">parse</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="ranger.shared.html#FileManagerAware">ranger.shared.FileManagerAware</a>(<a href="ranger.shared.html#Awareness">ranger.shared.Awareness</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="ranger.commands.html#Command">Command</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="ranger.commands.html#cd">cd</a>
</font></dt><dt><font face="helvetica, arial"><a href="ranger.commands.html#delete">delete</a>
</font></dt><dt><font face="helvetica, arial"><a href="ranger.commands.html#delete">delete</a>
</font></dt><dt><font face="helvetica, arial"><a href="ranger.commands.html#find">find</a>
</font></dt><dt><font face="helvetica, arial"><a href="ranger.commands.html#mkdir">mkdir</a>
</font></dt><dt><font face="helvetica, arial"><a href="ranger.commands.html#quit">quit</a>
</font></dt></dl>
</dd>
</dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Command">class <strong>Command</strong></a>(<a href="ranger.shared.html#FileManagerAware">ranger.shared.FileManagerAware</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Abstract&nbsp;command&nbsp;class<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="ranger.commands.html#Command">Command</a></dd>
<dd><a href="ranger.shared.html#FileManagerAware">ranger.shared.FileManagerAware</a></dd>
<dd><a href="ranger.shared.html#Awareness">ranger.shared.Awareness</a></dd>
<dd><a href="builtins.html#object">builtins.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Command-__init__"><strong>__init__</strong></a>(self, line, mode)</dt></dl>

<dl><dt><a name="Command-execute"><strong>execute</strong></a>(self)</dt></dl>

<dl><dt><a name="Command-quick_open"><strong>quick_open</strong></a>(self)</dt></dl>

<dl><dt><a name="Command-tab"><strong>tab</strong></a>(self)</dt></dl>

<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>line</strong> = ''</dl>

<dl><dt><strong>mode</strong> = ':'</dl>

<dl><dt><strong>name</strong> = None</dl>

<hr>
Data and other attributes inherited from <a href="ranger.shared.html#FileManagerAware">ranger.shared.FileManagerAware</a>:<br>
<dl><dt><strong>fm</strong> = None</dl>

<hr>
Data descriptors inherited from <a href="ranger.shared.html#Awareness">ranger.shared.Awareness</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="cd">class <strong>cd</strong></a>(<a href="ranger.commands.html#Command">Command</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>The&nbsp;<a href="#cd">cd</a>&nbsp;command&nbsp;changes&nbsp;the&nbsp;directory.&nbsp;The&nbsp;command&nbsp;'<a href="#cd">cd</a>&nbsp;-'&nbsp;is<br>
equivalent&nbsp;to&nbsp;typing&nbsp;``.&nbsp;In&nbsp;the&nbsp;quick&nbsp;console,&nbsp;the&nbsp;directory<br>
will&nbsp;be&nbsp;entered&nbsp;without&nbsp;the&nbsp;need&nbsp;to&nbsp;press&nbsp;enter,&nbsp;as&nbsp;soon&nbsp;as&nbsp;there<br>
is&nbsp;one&nbsp;unambiguous&nbsp;match.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="ranger.commands.html#cd">cd</a></dd>
<dd><a href="ranger.commands.html#Command">Command</a></dd>
<dd><a href="ranger.shared.html#FileManagerAware">ranger.shared.FileManagerAware</a></dd>
<dd><a href="ranger.shared.html#Awareness">ranger.shared.Awareness</a></dd>
<dd><a href="builtins.html#object">builtins.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="cd-execute"><strong>execute</strong></a>(self)</dt></dl>

<dl><dt><a name="cd-quick_open"><strong>quick_open</strong></a>(self)</dt></dl>

<dl><dt><a name="cd-tab"><strong>tab</strong></a>(self)</dt></dl>

<hr>
Methods inherited from <a href="ranger.commands.html#Command">Command</a>:<br>
<dl><dt><a name="cd-__init__"><strong>__init__</strong></a>(self, line, mode)</dt></dl>

<hr>
Data and other attributes inherited from <a href="ranger.commands.html#Command">Command</a>:<br>
<dl><dt><strong>line</strong> = ''</dl>

<dl><dt><strong>mode</strong> = ':'</dl>

<dl><dt><strong>name</strong> = None</dl>

<hr>
Data and other attributes inherited from <a href="ranger.shared.html#FileManagerAware">ranger.shared.FileManagerAware</a>:<br>
<dl><dt><strong>fm</strong> = None</dl>

<hr>
Data descriptors inherited from <a href="ranger.shared.html#Awareness">ranger.shared.Awareness</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="delete">class <strong>delete</strong></a>(<a href="ranger.commands.html#Command">Command</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="ranger.commands.html#delete">delete</a></dd>
<dd><a href="ranger.commands.html#Command">Command</a></dd>
<dd><a href="ranger.shared.html#FileManagerAware">ranger.shared.FileManagerAware</a></dd>
<dd><a href="ranger.shared.html#Awareness">ranger.shared.Awareness</a></dd>
<dd><a href="builtins.html#object">builtins.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="delete-execute"><strong>execute</strong></a>(self)</dt></dl>

<hr>
Methods inherited from <a href="ranger.commands.html#Command">Command</a>:<br>
<dl><dt><a name="delete-__init__"><strong>__init__</strong></a>(self, line, mode)</dt></dl>

<dl><dt><a name="delete-quick_open"><strong>quick_open</strong></a>(self)</dt></dl>

<dl><dt><a name="delete-tab"><strong>tab</strong></a>(self)</dt></dl>

<hr>
Data and other attributes inherited from <a href="ranger.commands.html#Command">Command</a>:<br>
<dl><dt><strong>line</strong> = ''</dl>

<dl><dt><strong>mode</strong> = ':'</dl>

<dl><dt><strong>name</strong> = None</dl>

<hr>
Data and other attributes inherited from <a href="ranger.shared.html#FileManagerAware">ranger.shared.FileManagerAware</a>:<br>
<dl><dt><strong>fm</strong> = None</dl>

<hr>
Data descriptors inherited from <a href="ranger.shared.html#Awareness">ranger.shared.Awareness</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="find">class <strong>find</strong></a>(<a href="ranger.commands.html#Command">Command</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>The&nbsp;<a href="#find">find</a>&nbsp;command&nbsp;will&nbsp;attempt&nbsp;to&nbsp;<a href="#find">find</a>&nbsp;a&nbsp;partial,&nbsp;case&nbsp;insensitive<br>
match&nbsp;in&nbsp;the&nbsp;filenames&nbsp;of&nbsp;the&nbsp;current&nbsp;directory.&nbsp;In&nbsp;the&nbsp;quick&nbsp;command<br>
console,&nbsp;once&nbsp;there&nbsp;is&nbsp;one&nbsp;unambiguous&nbsp;match,&nbsp;the&nbsp;file&nbsp;will&nbsp;be&nbsp;run<br>
automatically.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="ranger.commands.html#find">find</a></dd>
<dd><a href="ranger.commands.html#Command">Command</a></dd>
<dd><a href="ranger.shared.html#FileManagerAware">ranger.shared.FileManagerAware</a></dd>
<dd><a href="ranger.shared.html#Awareness">ranger.shared.Awareness</a></dd>
<dd><a href="builtins.html#object">builtins.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="find-execute"><strong>execute</strong></a>(self)</dt></dl>

<dl><dt><a name="find-quick_open"><strong>quick_open</strong></a>(self)</dt></dl>

<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>count</strong> = 0</dl>

<hr>
Methods inherited from <a href="ranger.commands.html#Command">Command</a>:<br>
<dl><dt><a name="find-__init__"><strong>__init__</strong></a>(self, line, mode)</dt></dl>

<dl><dt><a name="find-tab"><strong>tab</strong></a>(self)</dt></dl>

<hr>
Data and other attributes inherited from <a href="ranger.commands.html#Command">Command</a>:<br>
<dl><dt><strong>line</strong> = ''</dl>

<dl><dt><strong>mode</strong> = ':'</dl>

<dl><dt><strong>name</strong> = None</dl>

<hr>
Data and other attributes inherited from <a href="ranger.shared.html#FileManagerAware">ranger.shared.FileManagerAware</a>:<br>
<dl><dt><strong>fm</strong> = None</dl>

<hr>
Data descriptors inherited from <a href="ranger.shared.html#Awareness">ranger.shared.Awareness</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="mkdir">class <strong>mkdir</strong></a>(<a href="ranger.commands.html#Command">Command</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="ranger.commands.html#mkdir">mkdir</a></dd>
<dd><a href="ranger.commands.html#Command">Command</a></dd>
<dd><a href="ranger.shared.html#FileManagerAware">ranger.shared.FileManagerAware</a></dd>
<dd><a href="ranger.shared.html#Awareness">ranger.shared.Awareness</a></dd>
<dd><a href="builtins.html#object">builtins.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="mkdir-execute"><strong>execute</strong></a>(self)</dt></dl>

<hr>
Methods inherited from <a href="ranger.commands.html#Command">Command</a>:<br>
<dl><dt><a name="mkdir-__init__"><strong>__init__</strong></a>(self, line, mode)</dt></dl>

<dl><dt><a name="mkdir-quick_open"><strong>quick_open</strong></a>(self)</dt></dl>

<dl><dt><a name="mkdir-tab"><strong>tab</strong></a>(self)</dt></dl>

<hr>
Data and other attributes inherited from <a href="ranger.commands.html#Command">Command</a>:<br>
<dl><dt><strong>line</strong> = ''</dl>

<dl><dt><strong>mode</strong> = ':'</dl>

<dl><dt><strong>name</strong> = None</dl>

<hr>
Data and other attributes inherited from <a href="ranger.shared.html#FileManagerAware">ranger.shared.FileManagerAware</a>:<br>
<dl><dt><strong>fm</strong> = None</dl>

<hr>
Data descriptors inherited from <a href="ranger.shared.html#Awareness">ranger.shared.Awareness</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="parse">class <strong>parse</strong></a>(<a href="builtins.html#object">builtins.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Parse&nbsp;commands&nbsp;and&nbsp;extract&nbsp;information<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="parse-__add__"><strong>__add__</strong></a>(self, newpart)</dt></dl>

<dl><dt><a name="parse-__init__"><strong>__init__</strong></a>(self, line)</dt></dl>

<dl><dt><a name="parse-chunk"><strong>chunk</strong></a>(self, n, otherwise<font color="#909090">=''</font>)</dt></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="quit">class <strong>quit</strong></a>(<a href="ranger.commands.html#Command">Command</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Quits&nbsp;the&nbsp;program.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="ranger.commands.html#quit">quit</a></dd>
<dd><a href="ranger.commands.html#Command">Command</a></dd>
<dd><a href="ranger.shared.html#FileManagerAware">ranger.shared.FileManagerAware</a></dd>
<dd><a href="ranger.shared.html#Awareness">ranger.shared.Awareness</a></dd>
<dd><a href="builtins.html#object">builtins.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="quit-execute"><strong>execute</strong></a>(self)</dt></dl>

<hr>
Methods inherited from <a href="ranger.commands.html#Command">Command</a>:<br>
<dl><dt><a name="quit-__init__"><strong>__init__</strong></a>(self, line, mode)</dt></dl>

<dl><dt><a name="quit-quick_open"><strong>quick_open</strong></a>(self)</dt></dl>

<dl><dt><a name="quit-tab"><strong>tab</strong></a>(self)</dt></dl>

<hr>
Data and other attributes inherited from <a href="ranger.commands.html#Command">Command</a>:<br>
<dl><dt><strong>line</strong> = ''</dl>

<dl><dt><strong>mode</strong> = ':'</dl>

<dl><dt><strong>name</strong> = None</dl>

<hr>
Data and other attributes inherited from <a href="ranger.shared.html#FileManagerAware">ranger.shared.FileManagerAware</a>:<br>
<dl><dt><strong>fm</strong> = None</dl>

<hr>
Data descriptors inherited from <a href="ranger.shared.html#Awareness">ranger.shared.Awareness</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><strong>var</strong> = <a name="var">class delete</a>(<a href="ranger.commands.html#Command">Command</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="ranger.commands.html#delete">delete</a></dd>
<dd><a href="ranger.commands.html#Command">Command</a></dd>
<dd><a href="ranger.shared.html#FileManagerAware">ranger.shared.FileManagerAware</a></dd>
<dd><a href="ranger.shared.html#Awareness">ranger.shared.Awareness</a></dd>
<dd><a href="builtins.html#object">builtins.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="delete-execute"><strong>execute</strong></a>(self)</dt></dl>

<hr>
Methods inherited from <a href="ranger.commands.html#Command">Command</a>:<br>
<dl><dt><a name="delete-__init__"><strong>__init__</strong></a>(self, line, mode)</dt></dl>

<dl><dt><a name="delete-quick_open"><strong>quick_open</strong></a>(self)</dt></dl>

<dl><dt><a name="delete-tab"><strong>tab</strong></a>(self)</dt></dl>

<hr>
Data and other attributes inherited from <a href="ranger.commands.html#Command">Command</a>:<br>
<dl><dt><strong>line</strong> = ''</dl>

<dl><dt><strong>mode</strong> = ':'</dl>

<dl><dt><strong>name</strong> = None</dl>

<hr>
Data and other attributes inherited from <a href="ranger.shared.html#FileManagerAware">ranger.shared.FileManagerAware</a>:<br>
<dl><dt><strong>fm</strong> = None</dl>

<hr>
Data descriptors inherited from <a href="ranger.shared.html#Awareness">ranger.shared.Awareness</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-alias"><strong>alias</strong></a>(**kw)</dt></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>by_name</strong> = {'cd': &lt;class 'ranger.commands.cd'&gt;, 'delete': &lt;class 'ranger.commands.delete'&gt;, 'find': &lt;class 'ranger.commands.find'&gt;, 'mkdir': &lt;class 'ranger.commands.mkdir'&gt;, 'q': &lt;class 'ranger.commands.quit'&gt;, 'quit': &lt;class 'ranger.commands.quit'&gt;}<br>
<strong>varname</strong> = 'delete'</td></tr></table>
</body></html>
pan>10) Margin = 10; } /* * We expect the called function to pass us a default (old) value * with a length that is less than or equal to maxstr, and to * handle any messaging associated with actions to achieve that * requirement. However, in case the calling function screwed * up, we'll check it here, and ensure that no buffer overrun can * occur by loading only as much of the head as fits. - FM */ if (strlen(old) >= maxstr) { strncpy(edit->buffer, old, maxstr); edit->buffer[maxstr] = '\0'; StrLen = maxstr; } else { strcpy(edit->buffer, old); } } PUBLIC int LYEdit1 ARGS4( EDREC *, edit, int, ch, int, action, BOOL, maxMessage) { /* returns 0 character processed * ch otherwise */ int i; int length; if (MaxLen <= 0) return(0); /* Be defensive */ length=strlen(&Buf[0]); StrLen = length; switch (action) { case LYE_AIX: /* * Hex 97. * Fall through as a character for CJK. * Otherwise, we treat this as LYE_ENTER. */ if (HTCJK == NOCJK) return(ch); case LYE_CHAR: /* * ch is printable or ISO-8859-1 escape character. */ if (Pos <= (MaxLen) && StrLen < (MaxLen)) { for(i = length; i >= Pos; i--) /* Make room */ Buf[i+1] = Buf[i]; Buf[length+1]='\0'; Buf[Pos] = (unsigned char) ch; Pos++; } else if (maxMessage) { _statusline(MAXLEN_REACHED_DEL_OR_MOV); } break; case LYE_BACKW: /* * Backword. * Definition of word is very naive: 1 or more a/n characters. */ while (Pos && !isalnum(Buf[Pos-1])) Pos--; while (Pos && isalnum(Buf[Pos-1])) Pos--; break; case LYE_FORWW: /* * Word forward. */ while (isalnum(Buf[Pos])) Pos++; /* '\0' is not a/n */ while (!isalnum(Buf[Pos]) && Buf[Pos]) Pos++ ; break; case LYE_ERASE: /* * Erase the line to start fresh. */ Buf[0] = '\0'; /* fall through */ case LYE_BOL: /* * Go to first column. */ Pos = 0; break; case LYE_EOL: /* * Go to last column. */ Pos = length; break; case LYE_DELNW: /* * Delete next word. */ { int pos0 = Pos; LYEdit1 (edit, 0, LYE_FORWW, FALSE); while (Pos > pos0) LYEdit1(edit, 0, LYE_DELP, FALSE); } break; case LYE_DELPW: /* * Delete previous word. */ { int pos0 = Pos; LYEdit1 (edit, 0, LYE_BACKW, FALSE); pos0 -= Pos; while (pos0--) LYEdit1(edit, 0, LYE_DELN, FALSE); } break; case LYE_DELN: /* * Delete next character */ if (Pos >= length) break; Pos++; /* fall through */ case LYE_DELP: /* * Delete preceding character. */ if (length == 0 || Pos == 0) break; Pos--; for (i = Pos; i < length; i++) Buf[i] = Buf[i+1]; i--; Buf[i] = 0; break; case LYE_DELC: /* * Delete current character. */ if (length == 0) break; for (i = Pos; i < length; i++) Buf[i] = Buf[i+1]; i--; Buf[i] = 0; break; case LYE_FORW: /* * Move cursor to the right. */ if (Pos < length) Pos++; break; case LYE_BACK: /* * Left-arrow move cursor to the left. */ if (Pos > 0) Pos--; break; case LYE_UPPER: for (i = 0; Buf[i]; i++) Buf[i] = TOUPPER(Buf[i]); break; case LYE_LOWER: for (i = 0; Buf[i]; i++) Buf[i] = TOLOWER(Buf[i]); break; default: return(ch); } edit->dirty = TRUE; StrLen = strlen(&Buf[0]); return(0); } PUBLIC void LYRefreshEdit ARGS1( EDREC *, edit) { int i; int length; int nrdisplayed; int padsize; char *str; char buffer[3]; buffer[0] = buffer[1] = buffer[2] = '\0'; if (!edit->dirty || (DspWdth == 0)) return; edit->dirty = FALSE; length=strlen(&Buf[0]); edit->strlen = length; /* * Now we have: * .--DspWdth---. * +---------+=============+-----------+ * | |M M| | (M=margin) * +---------+=============+-----------+ * 0 DspStart length * * Insertion point can be anywhere beween 0 and stringlength. * Figure out new display starting point. * * The first "if" below makes Lynx scroll several columns at a time when * extending the string. Looks awful, but that way we can keep up with * data entry at low baudrates. */ if ((DspStart + DspWdth) <= length) if (Pos >= (DspStart + DspWdth) - Margin) DspStart=(Pos - DspWdth) + Margin; if (Pos < DspStart + Margin) { DspStart = Pos - Margin; if (DspStart < 0) DspStart = 0; } str = &Buf[DspStart]; nrdisplayed = length-DspStart; if (nrdisplayed > DspWdth) nrdisplayed = DspWdth; move(edit->sy, edit->sx); if (edit->hidden) { for (i = 0; i < nrdisplayed; i++) addch('*'); } else { for (i = 0; i < nrdisplayed; i++) if ((buffer[0] = str[i]) == 1 || buffer[0] == 2 || ((unsigned char)buffer[0] == 160 && !(HTPassHighCtrlRaw || HTCJK != NOCJK))) { addch(' '); } else { /* For CJK strings, by Masanobu Kimura */ if (HTCJK != NOCJK && !isascii(buffer[0])) { if (i < (nrdisplayed - 1)) buffer[1] = str[++i]; addstr(buffer); buffer[1] = '\0'; } else { addstr(buffer); } } } /* * Erase rest of input area. */ padsize = DspWdth-nrdisplayed; while (padsize--) addch((unsigned char)edit->pad); /* * Scrolling indicators. */ if (edit->panon) { if ((DspStart + nrdisplayed) < length) { move(edit->sy, edit->sx+nrdisplayed-1); addch('}'); } if (DspStart) { move(edit->sy, edit->sx); addch('{'); } } move(edit->sy, edit->sx + Pos - DspStart); refresh(); } PUBLIC int LYgetstr ARGS4( char *, inputline, int, hidden, int, bufsize, int, recall) { int x, y, MaxStringSize; int ch; EditFieldData MyEdit; LYGetYX(y, x); /* Use screen from cursor position to eol */ MaxStringSize = (bufsize < sizeof(MyEdit.buffer)) ? (bufsize - 1) : (sizeof(MyEdit.buffer) - 1); LYSetupEdit(&MyEdit, inputline, MaxStringSize, (LYcols-1)-x); MyEdit.hidden = hidden ; for (;;) { again: LYRefreshEdit(&MyEdit); ch = LYgetch(); #ifdef VMS if (term_letter || term_options || term_message || HadVMSInterrupt) { HadVMSInterrupt = FALSE; ch = 7; } #else if (term_letter || term_options || term_message) ch = 7; #endif /* VMS */ if (recall && (ch == UPARROW || ch == DNARROW)) { strcpy(inputline, MyEdit.buffer); return(ch); } if (keymap[ch + 1] == LYK_REFRESH) goto again; switch (EditBinding(ch)) { case LYE_TAB: ch = '\t'; /* fall through */ case LYE_AIX: /* * Hex 97. * Treat as a character for CJK. * Otherwise, we treat this as LYE_ENTER. */ if (HTCJK != NOCJK && ch != '\t') { LYLineEdit(&MyEdit,ch, FALSE); break; } case LYE_ENTER: /* * Terminate the string and return. */ strcpy(inputline, MyEdit.buffer); return(ch); break; case LYE_ABORT: /* * Control-C or Control-G aborts. */ inputline[0] = '\0'; return(-1); break; default: LYLineEdit(&MyEdit,ch, FALSE); } } } /* * LYstrstr will find the first occurence of the string * pointed to by tarptr in the string pointed to by chptr. * It is a case insensitive search. */ PUBLIC char * LYstrstr ARGS2( char *, chptr, char *, tarptr) { register char *tmpchptr, *tmptarptr; for(; *chptr != '\0'; chptr++) { if(TOUPPER(*chptr) == TOUPPER(*tarptr)) { /* see if they line up */ for(tmpchptr = chptr+1, tmptarptr = tarptr+1; (TOUPPER(*tmpchptr) == TOUPPER(*tmptarptr) && *tmptarptr != '\0' && *tmpchptr != '\0'); tmpchptr++, tmptarptr++) ; /* null body */ if(*tmptarptr == '\0') return(chptr); } } /* end for */ return(NULL); } /* * LYno_attr_char_case_strstr will find the first occurence of the * string pointed to by tarptr in the string pointed to by chptr. * It ignores the characters: LY_UNDERLINE_START_CHAR and * LY_UNDERLINE_END_CHAR * LY_BOLD_START_CHAR * LY_BOLD_END_CHAR * LY_SOFT_HYPHEN * if present in chptr. * It is a case insensitive search. */ PUBLIC char * LYno_attr_char_case_strstr ARGS2( char *, chptr, char *, tarptr) { register char *tmpchptr, *tmptarptr; if (!chptr) return(NULL); while (IsSpecialAttrChar(*chptr) && *chptr != '\0') chptr++; for (; *chptr != '\0'; chptr++) { if (TOUPPER(*chptr) == TOUPPER(*tarptr)) { /* * See if they line up. */ tmpchptr = chptr+1; tmptarptr = tarptr+1; if (*tmptarptr == '\0') /* one char target */ return(chptr); while (1) { if (!IsSpecialAttrChar(*tmpchptr)) { if (TOUPPER(*tmpchptr) != TOUPPER(*tmptarptr)) break; tmpchptr++; tmptarptr++; } else { tmpchptr++; } if (*tmptarptr == '\0') return(chptr); if (*tmpchptr == '\0') break; } } } /* end for */ return(NULL); } /* * LYno_attr_char_strstr will find the first occurence of the * string pointed to by tarptr in the string pointed to by chptr. * It ignores the characters: LY_UNDERLINE_START_CHAR and * LY_UNDERLINE_END_CHAR * LY_BOLD_START_CHAR * LY_BOLD_END_CHAR * LY_SOFT_HYPHEN * if present in chptr. * It is a case sensitive search. */ PUBLIC char * LYno_attr_char_strstr ARGS2( char *, chptr, char *, tarptr) { register char *tmpchptr, *tmptarptr; if (!chptr) return(NULL); while (IsSpecialAttrChar(*chptr) && *chptr != '\0') chptr++; for (; *chptr != '\0'; chptr++) { if ((*chptr) == (*tarptr)) { /* * See if they line up. */ tmpchptr = chptr + 1; tmptarptr = tarptr + 1; if (*tmptarptr == '\0') /* one char target */ return(chptr); while (1) { if (!IsSpecialAttrChar(*tmpchptr)) { if ((*tmpchptr) != (*tmptarptr)) break; tmpchptr++; tmptarptr++; } else { tmpchptr++; } if (*tmptarptr == '\0') return(chptr); if (*tmpchptr == '\0') break; } } } /* end for */ return(NULL); } /* * LYno_attr_mbcs_case_strstr will find the first occurence of the string * pointed to by tarptr in the string pointed to by chptr. * It takes account of MultiByte Character Sequences (UTF8). * The physical lenght of the displayed string up to the end of the target * string is returned in *nendp if the search is successful. * It ignores the characters: LY_UNDERLINE_START_CHAR and * LY_UNDERLINE_END_CHAR * LY_BOLD_START_CHAR * LY_BOLD_END_CHAR * LY_SOFT_HYPHEN * if present in chptr. * It assumes UTF8 if utf_flag is set. * It is a case insensitive search. - KW & FM */ PUBLIC char * LYno_attr_mbcs_case_strstr ARGS5( char *, chptr, char *, tarptr, BOOL, utf_flag, int *, nstartp, int *, nendp) { register char *tmpchptr, *tmptarptr; int len = 0; int offset; if (!(chptr && tarptr)) return(NULL); /* * Skip initial IsSpecial chars. - FM */ while (IsSpecialAttrChar(*chptr) && *chptr != '\0') chptr++; /* * Seek a first target match. - FM */ for (; *chptr != '\0'; chptr++) { if ((!utf_flag && HTCJK != NOCJK && !isascii(*chptr) && *chptr == *tarptr && *(chptr + 1) != '\0' && !IsSpecialAttrChar(*(chptr + 1))) || TOUPPER(*chptr) == TOUPPER(*tarptr)) { int tarlen = 0; offset = len; len++; /* * See if they line up. */ tmpchptr = (chptr + 1); tmptarptr = (tarptr + 1); if (*tmptarptr == '\0') { /* * One char target. */ *nstartp = offset; *nendp = len; return(chptr); } if (!utf_flag && HTCJK != NOCJK && !isascii(*chptr) && *chptr == *tarptr && *tmpchptr != '\0' && !IsSpecialAttrChar(*tmpchptr)) { /* * Check the CJK mutibyte. - FM */ if (*tmpchptr == *tmptarptr) { /* * It's a match. Advance to next char. - FM */ tmpchptr++; tmptarptr++; if (*tmptarptr == '\0') { /* * One character match. - FM */ *nstartp = offset; *nendp = len + tarlen; return(chptr); } tarlen++; } else { /* * It's not a match, so go back to * seeking a first target match. - FM */ chptr++; continue; } } /* * See if the rest of the target matches. - FM */ while (1) { if (!IsSpecialAttrChar(*tmpchptr)) { if (!utf_flag && HTCJK != NOCJK && !isascii(*tmpchptr)) { if (*tmpchptr == *tmptarptr && *(tmpchptr + 1) == *(tmptarptr + 1) && !IsSpecialAttrChar(*(tmpchptr + 1))) { tmpchptr++; tmptarptr++; } else { break; } } else if (TOUPPER(*tmpchptr) != TOUPPER(*tmptarptr)) { break; } if (!IS_UTF_EXTRA(*tmptarptr)) { tarlen++; } tmpchptr++; tmptarptr++; } else { tmpchptr++; } if (*tmptarptr == '\0') { *nstartp = offset; *nendp = len + tarlen; return(chptr); } if (*tmpchptr == '\0') { break; } } } else if (!(IS_UTF_EXTRA(*chptr) || IsSpecialAttrChar(*chptr))) { if (!utf_flag && HTCJK != NOCJK && !isascii(*chptr) && *(chptr + 1) != '\0' && !IsSpecialAttrChar(*(chptr + 1))) { chptr++; } len++; } } /* end for */ return(NULL); } /* * LYno_attr_mbcs_strstr will find the first occurence of the string * pointed to by tarptr in the string pointed to by chptr. * It takes account of CJK and MultiByte Character Sequences (UTF8). * The physical lengths of the displayed string up to the start and * end of the target string are returned in *nstartp and *nendp if * the search is successful. * It ignores the characters: LY_UNDERLINE_START_CHAR and * LY_UNDERLINE_END_CHAR * LY_BOLD_START_CHAR * LY_BOLD_END_CHAR * LY_SOFT_HYPHEN * if present in chptr. * It assumes UTF8 if utf_flag is set. * It is a case sensitive search. - KW & FM */ PUBLIC char * LYno_attr_mbcs_strstr ARGS5( char *, chptr, char *, tarptr, BOOL, utf_flag, int *, nstartp, int *, nendp) { register char *tmpchptr, *tmptarptr; int len = 0; int offset; if (!(chptr && tarptr)) return(NULL); /* * Skip initial IsSpecial chars. - FM */ while (IsSpecialAttrChar(*chptr) && *chptr != '\0') chptr++; /* * Seek a first target match. - FM */ for (; *chptr != '\0'; chptr++) { if ((*chptr) == (*tarptr)) { int tarlen = 0; offset = len; len++; /* * See if they line up. */ tmpchptr = (chptr + 1); tmptarptr = (tarptr + 1); if (*tmptarptr == '\0') { /* * One char target. */ *nstartp = offset; *nendp = len + 1; return(chptr); } if (!utf_flag && HTCJK != NOCJK && !isascii(*chptr) && *tmpchptr != '\0' && !IsSpecialAttrChar(*tmpchptr)) { /* * Check the CJK mutibyte. - FM */ if (*tmpchptr == *tmptarptr) { /* * It's a match. Advance to next char. - FM */ tmpchptr++; tmptarptr++; if (*tmptarptr == '\0') { /* * One character match. - FM */ *nstartp = offset; *nendp = len + tarlen; return(chptr); } tarlen++; } else { /* * It's not a match, so go back to * seeking a first target match. - FM */ chptr++; continue; } } /* * See if the rest of the target matches. - FM */ while (1) { if (!IsSpecialAttrChar(*tmpchptr)) { if (!utf_flag && HTCJK != NOCJK && !isascii(*tmpchptr)) { if (*tmpchptr == *tmptarptr && *(tmpchptr + 1) == *(tmptarptr + 1) && !IsSpecialAttrChar(*(tmpchptr + 1))) { tmpchptr++; tmptarptr++; } else { break; } } else if ((*tmpchptr) != (*tmptarptr)) { break; } if (!IS_UTF_EXTRA(*tmptarptr)) { tarlen++; } tmpchptr++; tmptarptr++; } else { tmpchptr++; } if (*tmptarptr == '\0') { *nstartp = offset; *nendp = len + tarlen; return(chptr); } if (*tmpchptr == '\0') { break; } } } else if (!(IS_UTF_EXTRA(*chptr) || IsSpecialAttrChar(*chptr))) { if (!utf_flag && HTCJK != NOCJK && !isascii(*chptr) && *(chptr + 1) != '\0' && !IsSpecialAttrChar(*(chptr + 1))) { chptr++; } len++; } } /* end for */ return(NULL); } /* * Allocate a new copy of a string, and returns it. */ PUBLIC char * SNACopy ARGS3( char **, dest, CONST char *, src, int, n) { FREE(*dest); if (src) { *dest = (char *)calloc(1, n + 1); if (*dest == NULL) { if (TRACE) fprintf(stderr, "Tried to calloc %d bytes\n", n); outofmem(__FILE__, "SNACopy"); } strncpy (*dest, src, n); *(*dest + n) = '\0'; /* terminate */ } return *dest; } /* * String Allocate and Concatenate. */ PUBLIC char * SNACat ARGS3( char **, dest, CONST char *, src, int, n) { if (src && *src) { if (*dest) { int length = strlen(*dest); *dest = (char *)realloc(*dest, length + n + 1); if (*dest == NULL) outofmem(__FILE__, "SNACat"); strncpy(*dest + length, src, n); *(*dest + length + n) = '\0'; /* terminate */ } else { *dest = (char *)calloc(1, strlen(src) + 1); if (*dest == NULL) outofmem(__FILE__, "SNACat"); strncpy(*dest, src, n); *dest[n] = '\0'; /* terminate */ } } return *dest; }