summary refs log tree commit diff stats
path: root/ranger.py
blob: 6915457f5a613e6125280cafa6373c89947dcf4b (plain) (blame)
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
#!/usr/bin/python
# coding=utf-8
# ranger: Explore your forest of files from inside your terminal
#
# Copyright (c) 2009, 2010 hut <hut@lavabit.com>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
# ----------------------------------------------------------------------------
#
# An embedded shell script. It allows you to change the directory
# of the parent shell to the last visited directory in ranger after exit.
# For more information, check out doc/cd-after-exit.txt
# To enable this, start ranger with:
#     source /path/ranger /path/ranger
"""":
if [ $1 ]; then
	RANGER="$1"
	shift
	cd "`$RANGER --cd-after-exit \"$@\" 3>&1 1>&2 2>&3 3>&-`"
else
	echo "usage: source path/to/ranger.py path/to/ranger.py"
fi
return 1
"""

# Redefine the docstring, since the previous one was hijacked to
# embed a shellscript.
__doc__ = """Ranger - file browser for the unix terminal"""


# Importing the main method may fail if the ranger directory
# is neither in the same directory as this file, nor in one of
# pythons global import paths.
try:
	from ranger import main

except ImportError as errormessage:
	if str(errormessage).endswith("main"):
		print("Can't import the main module.")
		print("To run an uninstalled copy of ranger,")
		print("launch ranger.py in the top directory.")
	else:
		raise

else:
	main()
us revision' href='/akspecs/ranger/blame/doc/pydoc/ranger.defaults.options.html?h=v1.5.3&id=6c867217763b0527776bad87493d4b950287caf0'>^
34a60763 ^
a614f048 ^
f07bb12f ^
c776804d ^
34a60763 ^
f07bb12f ^
34a60763 ^
a614f048 ^


c776804d ^
f07bb12f ^
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
 

                                                                 






                                                                                                                                                                                                                                                        

                                                                                                                                                                                                           













                                                                                                                                     






                                                                                                  
                                                                                                                                                 
                                                                                        
                                                            
                                                                       





                                                                                               
                                                               
                                            
                                            

                                                 
                                         
                                      
                                                                    
                                                      
                                          
                                               
                                         
                                                
                                      
                                      
                                        
                                        
                                      


                                                  
                                                      
             
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module ranger.defaults.options</title>
</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>.<a href="ranger.defaults.html"><font color="#ffffff">defaults</font></a>.options</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/ranger/ranger/defaults/options.py">/home/hut/ranger/ranger/defaults/options.py</a></font></td></tr></table>
    <p><tt>This&nbsp;is&nbsp;the&nbsp;default&nbsp;configuration&nbsp;file&nbsp;of&nbsp;ranger.<br>
&nbsp;<br>
There&nbsp;are&nbsp;two&nbsp;ways&nbsp;of&nbsp;customizing&nbsp;ranger.&nbsp;&nbsp;The&nbsp;first&nbsp;and&nbsp;recommended<br>
method&nbsp;is&nbsp;creating&nbsp;a&nbsp;file&nbsp;at&nbsp;~/.ranger/options.py&nbsp;and&nbsp;adding<br>
those&nbsp;lines&nbsp;you&nbsp;want&nbsp;to&nbsp;change.&nbsp;&nbsp;It&nbsp;might&nbsp;look&nbsp;like&nbsp;this:<br>
&nbsp;<br>
from&nbsp;ranger.api.options&nbsp;import&nbsp;*<br>
preview_files&nbsp;=&nbsp;False&nbsp;&nbsp;#&nbsp;I&nbsp;hate&nbsp;previews!<br>
max_history_size&nbsp;=&nbsp;2000&nbsp;&nbsp;#&nbsp;I&nbsp;can&nbsp;afford&nbsp;it.<br>
&nbsp;<br>
The&nbsp;other&nbsp;way&nbsp;is&nbsp;directly&nbsp;editing&nbsp;this&nbsp;file.&nbsp;&nbsp;This&nbsp;will&nbsp;make&nbsp;upgrades<br>
of&nbsp;ranger&nbsp;more&nbsp;complicated&nbsp;though.<br>
&nbsp;<br>
Whatever&nbsp;you&nbsp;do,&nbsp;make&nbsp;sure&nbsp;the&nbsp;import-line&nbsp;stays&nbsp;intact&nbsp;and&nbsp;the&nbsp;type<br>
of&nbsp;the&nbsp;values&nbsp;stay&nbsp;the&nbsp;same.</tt></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="ranger.colorschemes.html">ranger.colorschemes</a><br>
</td><td width="25%" valign=top><a href="ranger.gui.color.html">ranger.gui.color</a><br>
</td><td width="25%" valign=top><a href="re.html">re</a><br>
</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="#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>autosave_bookmarks</strong> = True<br>
<strong>collapse_preview</strong> = True<br>
<strong>colorscheme</strong> = 'default'<br>
<strong>colorscheme_overlay</strong> = None<br>
<strong>draw_bookmark_borders</strong> = True<br>
<strong>draw_borders</strong> = False<br>
<strong>flushinput</strong> = True<br>
<strong>hidden_filter</strong> = &lt;_sre.SRE_Pattern object&gt;<br>
<strong>max_filesize_for_preview</strong> = 307200<br>
<strong>max_history_size</strong> = 20<br>
<strong>preview_directories</strong> = True<br>
<strong>preview_files</strong> = True<br>
<strong>save_console_history</strong> = True<br>
<strong>scroll_offset</strong> = 2<br>
<strong>shorten_title</strong> = 3<br>
<strong>show_cursor</strong> = False<br>
<strong>show_hidden</strong> = False<br>
<strong>sort</strong> = 'basename'<br>
<strong>sort_case_insensitive</strong> = False<br>
<strong>sort_directories_first</strong> = True<br>
<strong>sort_reverse</strong> = False<br>
<strong>update_title</strong> = True</td></tr></table>
</body></html>