summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-09-25 00:46:57 +0200
committerhut <hut@lavabit.com>2011-09-25 00:46:57 +0200
commit8d21b83ce6f77e3e348930e3ee45935917ee2e34 (patch)
tree559c7301ca9874a91a628e062d122873129fefb6
parentdbb04b860eb2cae2024523dd18b45401cc81e610 (diff)
downloadranger-8d21b83ce6f77e3e348930e3ee45935917ee2e34.tar.gz
extended manpage and fixed {load,save}_copy_buffer commands
-rw-r--r--Makefile3
-rw-r--r--doc/ranger.164
-rw-r--r--doc/ranger.pod48
-rw-r--r--ranger/defaults/commands.py13
4 files changed, 78 insertions, 50 deletions
diff --git a/Makefile b/Makefile
index 1c0b5fda..ed100a8e 100644
--- a/Makefile
+++ b/Makefile
@@ -67,6 +67,9 @@ man:
 	pod2man --stderr --center='ranger manual' --date='$(NAME)-$(VERSION)' \
 		--release=$(shell date +%x) doc/ranger.pod doc/ranger.1
 
+manhtml:
+	pod2html doc/ranger.pod --outfile=doc/ranger.1.html
+
 cleandoc:
 	test -d $(DOCDIR) && rm -f -- $(DOCDIR)/*.html || true
 
diff --git a/doc/ranger.1 b/doc/ranger.1
index 9fc64759..406297bd 100644
--- a/doc/ranger.1
+++ b/doc/ranger.1
@@ -124,7 +124,7 @@
 .\" ========================================================================
 .\"
 .IX Title "RANGER 1"
-.TH RANGER 1 "ranger-1.4.3" "09/24/2011" "ranger manual"
+.TH RANGER 1 "ranger-1.4.3" "09/25/2011" "ranger manual"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -194,8 +194,8 @@ down 5 lines, \fI2l\fR to open a file in mode 2, \fI10<Space>\fR to mark 10 file
 or \fI3?\fR to read the third chapter of the documentation.
 .PP
 Key bindings can be changed.  Detailed instructions for this are in the
-key binding configuration file at ranger/defaults/keys.py. You can copy it to
-your local configuration directory with the \-\-copy\-config option.
+key binding configuration file at \fIranger/defaults/keys.py\fR. You can copy it
+to your local configuration directory with the \-\-copy\-config option.
 .IP "h, j, k, l" 14
 .IX Item "h, j, k, l"
 Move left, down, up or right
@@ -351,9 +351,10 @@ This section lists all built-in settings of ranger.  The valid types for the
 value are in [brackets].  The hotkey to toggle the setting is in <brokets>, if
 a hotkey exists.
 .PP
-Settings can be changed in the file ~/.config/ranger/options.py or on the fly
-with the command \fB:set option value\fR.  Examples: \f(CW\*(C`:set column_ratios (1,2,3)\*(C'\fR, 
-\&\f(CW\*(C`:set show_hidden=True\*(C'\fR
+Settings can be changed in the file \fI~/.config/ranger/options.py\fR or on the
+fly with the command \fB:set option value\fR.  Examples:
+ :set column_ratios (1,2,3)
+ :set show_hidden=True
 .IP "autosave_bookmarks [bool]" 4
 .IX Item "autosave_bookmarks [bool]"
 Save bookmarks (used with mX and `X) instantly?  This helps to synchronize
@@ -363,8 +364,8 @@ loss.  When false, bookmarks are saved when ranger is exited.
 .IX Item "collapse_preview [bool] <zc>"
 When no preview is visible, should the last column be squeezed to make use of
 the whitespace?
-.IP "colorscheme_overlay [python function, None]" 4
-.IX Item "colorscheme_overlay [python function, None]"
+.IP "colorscheme_overlay [function, None]" 4
+.IX Item "colorscheme_overlay [function, None]"
 An overlay function for colorschemes.  See the default options.py for an
 explanation and an example.
 .IP "colorscheme [string]" 4
@@ -400,8 +401,8 @@ Draw borders around columns?
 Flush the input after each key hit?  One advantage is that when scrolling down
 with \*(L"j\*(R", ranger stops scrolling instantly when you release the key.  One
 disadvantage is that when you type commands blindly, some keys might get lost.
-.IP "hidden_filter [regular expression]" 4
-.IX Item "hidden_filter [regular expression]"
+.IP "hidden_filter [regexp]" 4
+.IX Item "hidden_filter [regexp]"
 A regular expression pattern for files which should be hidden.
 .IP "max_console_history_size [integer, None]" 4
 .IX Item "max_console_history_size [integer, None]"
@@ -450,7 +451,8 @@ Show dotfiles in the bookmark preview window? (Type ')
 Show hidden files?
 .IP "sort_case_insensitive [bool] <zc>" 4
 .IX Item "sort_case_insensitive [bool] <zc>"
-Sort case-insensitively?  If true, \*(L"a\*(R" will be listed before \*(L"B\*(R" even though its \s-1ASCII\s0 value is higher.
+Sort case-insensitively?  If true, \*(L"a\*(R" will be listed before \*(L"B\*(R" even though
+its \s-1ASCII\s0 value is higher.
 .IP "sort_directories_first [bool] <zd>" 4
 .IX Item "sort_directories_first [bool] <zd>"
 Sort directories first?
@@ -481,6 +483,14 @@ Enable this if key combinations with the Alt Key don't work for you.
 (Especially on xterm)
 .SH "COMMANDS"
 .IX Header "COMMANDS"
+.IP "bulkrename" 2
+.IX Item "bulkrename"
+This command opens a list of selected files in an external editor.  After you
+edit and save the file, it will generate a shell script which does bulk
+renaming according to the changes you did in the file.
+.Sp
+This shell script is opened in an editor for you to review.  After you close
+it, it will be executed.
 .IP "cd [\fIdirectory\fR]" 2
 .IX Item "cd [directory]"
 The cd command changes the directory.  The command \f(CW\*(C`:cd \-\*(C'\fR is equivalent to
@@ -532,8 +542,8 @@ it will be run immediately. (Or entered, if it's a directory.)
 Looks for a string in all marked files or directories.
 .IP "load_copy_buffer" 2
 .IX Item "load_copy_buffer"
-Load the copy buffer from \fIconfdir/copy_buffer\fR.  This can be used to pass the
-list of copied files to another ranger instance.
+Load the copy buffer from \fI~/.config/ranger/copy_buffer\fR.  This can be used to
+pass the list of copied files to another ranger instance.
 .IP "mark \fIpattern\fR" 2
 .IX Item "mark pattern"
 Mark all files matching the regular expression pattern.
@@ -577,13 +587,14 @@ Assigns a new value to an option.  Valid options are listed in the settings
 section.  Use tab completion to get the current value of an option, though this
 doesn't work for functions and regular expressions. Valid values are:
 .Sp
-.Vb 7
+.Vb 8
 \& None           None
 \& bool           True or False
+\& integer        0 or 1 or \-1 or 2 etc.
 \& list           [1, 2, 3]
 \& tuple          1, 2, 3 or (1, 2, 3)
 \& function       lambda <arguments>: <expression>
-\& regexp         regexp(\*(Aq<regexp>\*(Aq)
+\& regexp         regexp(\*(Aq<pattern>\*(Aq)
 \& string         Anything
 .Ve
 .IP "shell [\-\fIflags\fR] \fIcommand\fR" 2
@@ -601,18 +612,21 @@ Unmark all files matching a regular expression pattern.
 .SH "FILES"
 .IX Header "FILES"
 ranger reads several configuration files which are located in
-\&\f(CW$HOME\fR/.config/ranger or \f(CW$XDG_CONFIG_HOME\fR/ranger if \f(CW$XDG_CONFIG_HOME\fR is defined.
-The configuration is done mostly in python.  When removing a configuration file,
-remove its compiled version too.  (Python automatically compiles modules.
-Since python3 they are saved in the _\|_pycache_\|_ directory, earlier versions
-store them with the .pyc extension in the same directory.)
+\&\fI\f(CI$HOME\fI/.config/ranger\fR or \fI\f(CI$XDG_CONFIG_HOME\fI/ranger\fR if \f(CW$XDG_CONFIG_HOME\fR is
+defined.  The configuration is done mostly in python.  When removing a
+configuration file, remove its compiled version too.  (Python automatically
+compiles modules.  Since python3 they are saved in the _\|_pycache_\|_ directory,
+earlier versions store them with the .pyc extension in the same directory.)
 .PP
 Use the \-\-copy\-config option to obtain the default configuration files.  They
 include further documentation and it's too much to put here.
 .PP
 You don't need to copy the whole file though, most configuration files are
-overlaid on top of the defaults (options.py, command.py, keys.py) or can be
-sub-classed (apps.py, colorschemes).
+overlaid on top of the defaults (\fIoptions.py\fR, \fIcommand.py\fR, \fIkeys.py\fR) or
+can be sub-classed (\fIapps.py\fR, \fIcolorschemes\fR).
+.PP
+When starting ranger with the \fB\-\-clean\fR option, it will not access or create
+any of these files.
 .SS "\s-1CONFIGURATION\s0"
 .IX Subsection "CONFIGURATION"
 .IP "apps.py" 10
@@ -673,7 +687,7 @@ Defines the shell that ranger is going to use with the :shell command and
 the \*(L"S\*(R" key.  Defaults to \*(L"bash\*(R".
 .IP "\s-1XDG_CONFIG_HOME\s0" 8
 .IX Item "XDG_CONFIG_HOME"
-Specifies the directory for configuration files. Defaults to \*(L"$HOME/.config\*(R".
+Specifies the directory for configuration files. Defaults to \fI\f(CI$HOME\fI/.config\fR.
 .SH "EXAMPLES"
 .IX Header "EXAMPLES"
 .SS "\s-1VIM:\s0 File Chooser"
@@ -694,8 +708,8 @@ opening in your current vim session.
 .Ve
 .SS "Bash: cd to last path after exit"
 .IX Subsection "Bash: cd to last path after exit"
-This is a bash function (to put in your ~/.bashrc) to change the directory to
-the last visited one after ranger quits.  You can always type \f(CW\*(C`cd \-\*(C'\fR to go
+This is a bash function (to put in your \fI~/.bashrc\fR) to change the directory
+to the last visited one after ranger quits.  You can always type \f(CW\*(C`cd \-\*(C'\fR to go
 back to the original one.
 .PP
 .Vb 9
diff --git a/doc/ranger.pod b/doc/ranger.pod
index 38b3ca17..8f6cc62a 100644
--- a/doc/ranger.pod
+++ b/doc/ranger.pod
@@ -93,8 +93,8 @@ down 5 lines, I<2l> to open a file in mode 2, I<10<SpaceE<gt>> to mark 10 files
 or I<3?> to read the third chapter of the documentation.
 
 Key bindings can be changed.  Detailed instructions for this are in the
-key binding configuration file at ranger/defaults/keys.py. You can copy it to
-your local configuration directory with the --copy-config option.
+key binding configuration file at F<ranger/defaults/keys.py>. You can copy it
+to your local configuration directory with the --copy-config option.
 
 =over 14
 
@@ -320,9 +320,10 @@ This section lists all built-in settings of ranger.  The valid types for the
 value are in [brackets].  The hotkey to toggle the setting is in <brokets>, if
 a hotkey exists.
 
-Settings can be changed in the file ~/.config/ranger/options.py or on the fly
-with the command B<:set option value>.  Examples: C<:set column_ratios (1,2,3)>, 
-C<:set show_hidden=True>
+Settings can be changed in the file F<~/.config/ranger/options.py> or on the
+fly with the command B<:set option value>.  Examples:
+ :set column_ratios (1,2,3)
+ :set show_hidden=True
 
 =over
 
@@ -337,7 +338,7 @@ loss.  When false, bookmarks are saved when ranger is exited.
 When no preview is visible, should the last column be squeezed to make use of
 the whitespace?
 
-=item colorscheme_overlay [python function, None]
+=item colorscheme_overlay [function, None]
 
 An overlay function for colorschemes.  See the default options.py for an
 explanation and an example.
@@ -384,7 +385,7 @@ Flush the input after each key hit?  One advantage is that when scrolling down
 with "j", ranger stops scrolling instantly when you release the key.  One
 disadvantage is that when you type commands blindly, some keys might get lost.
 
-=item hidden_filter [regular expression]
+=item hidden_filter [regexp]
 
 A regular expression pattern for files which should be hidden.
 
@@ -448,7 +449,8 @@ Show hidden files?
 
 =item sort_case_insensitive [bool] <zc>
 
-Sort case-insensitively?  If true, "a" will be listed before "B" even though its ASCII value is higher.
+Sort case-insensitively?  If true, "a" will be listed before "B" even though
+its ASCII value is higher.
 
 =item sort_directories_first [bool] <zd>
 
@@ -561,8 +563,8 @@ Looks for a string in all marked files or directories.
 
 =item load_copy_buffer
 
-Load the copy buffer from I<confdir/copy_buffer>.  This can be used to pass the
-list of copied files to another ranger instance.
+Load the copy buffer from F<~/.config/ranger/copy_buffer>.  This can be used to
+pass the list of copied files to another ranger instance.
 
 =item mark I<pattern>
 
@@ -618,10 +620,11 @@ doesn't work for functions and regular expressions. Valid values are:
 
  None           None
  bool           True or False
+ integer        0 or 1 or -1 or 2 etc.
  list           [1, 2, 3]
  tuple          1, 2, 3 or (1, 2, 3)
  function       lambda <arguments>: <expression>
- regexp         regexp('<regexp>')
+ regexp         regexp('<pattern>')
  string         Anything
 
 =item shell [-I<flags>] I<command>
@@ -648,18 +651,21 @@ Unmark all files matching a regular expression pattern.
 =head1 FILES
 
 ranger reads several configuration files which are located in
-$HOME/.config/ranger or $XDG_CONFIG_HOME/ranger if $XDG_CONFIG_HOME is defined.
-The configuration is done mostly in python.  When removing a configuration file,
-remove its compiled version too.  (Python automatically compiles modules.
-Since python3 they are saved in the __pycache__ directory, earlier versions
-store them with the .pyc extension in the same directory.)
+F<$HOME/.config/ranger> or F<$XDG_CONFIG_HOME/ranger> if $XDG_CONFIG_HOME is
+defined.  The configuration is done mostly in python.  When removing a
+configuration file, remove its compiled version too.  (Python automatically
+compiles modules.  Since python3 they are saved in the __pycache__ directory,
+earlier versions store them with the .pyc extension in the same directory.)
 
 Use the --copy-config option to obtain the default configuration files.  They
 include further documentation and it's too much to put here.
 
 You don't need to copy the whole file though, most configuration files are
-overlaid on top of the defaults (options.py, command.py, keys.py) or can be
-sub-classed (apps.py, colorschemes).
+overlaid on top of the defaults (F<options.py>, F<command.py>, F<keys.py>) or
+can be sub-classed (F<apps.py>, F<colorschemes>).
+
+When starting ranger with the B<--clean> option, it will not access or create
+any of these files.
 
 =head2 CONFIGURATION
 
@@ -747,7 +753,7 @@ the "S" key.  Defaults to "bash".
 
 =item XDG_CONFIG_HOME
 
-Specifies the directory for configuration files. Defaults to "$HOME/.config".
+Specifies the directory for configuration files. Defaults to F<$HOME/.config>.
 
 =back
 
@@ -773,8 +779,8 @@ opening in your current vim session.
 
 =head2 Bash: cd to last path after exit
 
-This is a bash function (to put in your ~/.bashrc) to change the directory to
-the last visited one after ranger quits.  You can always type C<cd -> to go
+This is a bash function (to put in your F<~/.bashrc>) to change the directory
+to the last visited one after ranger quits.  You can always type C<cd -> to go
 back to the original one.
 
  function ranger-cd {
diff --git a/ranger/defaults/commands.py b/ranger/defaults/commands.py
index cb39ddf9..f25abc19 100644
--- a/ranger/defaults/commands.py
+++ b/ranger/defaults/commands.py
@@ -503,9 +503,11 @@ class load_copy_buffer(Command):
 		from ranger.fsobject import File
 		from os.path import exists
 		try:
-			f = open(self.fm.confpath(self.copy_buffer_filename), 'r')
+			fname = self.fm.confpath(self.copy_buffer_filename)
+			f = open(fname, 'r')
 		except:
-			return self.fm.notify("Cannot open file %s" % fname, bad=True)
+			return self.fm.notify("Cannot open %s" % \
+					(fname or self.copy_buffer_filename), bad=True)
 		self.fm.env.copy = set(File(g) \
 			for g in f.read().split("\n") if exists(g))
 		f.close()
@@ -520,10 +522,13 @@ class save_copy_buffer(Command):
 	"""
 	copy_buffer_filename = 'copy_buffer'
 	def execute(self):
+		fname = None
 		try:
-			f = open(self.fm.confpath(self.copy_buffer_filename), 'w')
+			fname = self.fm.confpath(self.copy_buffer_filename)
+			f = open(fname, 'w')
 		except:
-			return self.fm.notify("Cannot open file %s" % fname, bad=True)
+			return self.fm.notify("Cannot open %s" % \
+					(fname or self.copy_buffer_filename), bad=True)
 		f.write("\n".join(f.path for f in self.fm.env.copy))
 		f.close()
 
;id=b755631561fd1a9223effcc833e2c8201582f63d'>^
805d58c6 ^




1c2d788b ^



























805d58c6 ^

1c2d788b ^

805d58c6 ^

1c2d788b ^

805d58c6 ^

1c2d788b ^

























805d58c6 ^

1c2d788b ^















805d58c6 ^

1c2d788b ^

















805d58c6 ^

1c2d788b ^















805d58c6 ^

1c2d788b ^

















































3ea092f2 ^
1c2d788b ^






























805d58c6 ^





1c2d788b ^


805d58c6 ^








1c2d788b ^


805d58c6 ^





1c2d788b ^

805d58c6 ^





5e7f0caa ^
1c2d788b ^
805d58c6 ^





5e7f0caa ^
1c2d788b ^







































805d58c6 ^
1c2d788b ^





















805d58c6 ^


1c2d788b ^



672e3e50 ^


a654e4ec ^
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
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527