summary refs log blame commit diff stats
path: root/ranger.py
blob: 807e28a6bef295c179b106c7e2aa31be418bbfab (plain) (tree)
1
2
3
4
5
6
7
8

                 
                                                
 
 


                                                                  


                                                                 



                                                        
                                                                


        
 

                                                           
    
                               
 
                                   





                                                               
 

              
 
#!/usr/bin/python
# coding=utf-8
# ranger: Browse your files inside the terminal.


# An embedded shell script. Assuming this file is /usr/bin/ranger,
# this hack allows you to use the cd-after-exit feature by typing:
# source ranger ranger
# Now when you quit ranger, it should change the directory of the
# parent shell to where you have last been in ranger.
# Works with at least bash and zsh.
"""":
if [ $1 ]; then
	cd "`$1 --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
"""

__doc__ = """Ranger - file browser for the unix terminal"""

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()
='n62' href='#n62'>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





                                                                 





                   
                     

             


           

            
            

               

          
             
         

               
   



               
                


                   
                      





             





                                         


               
             
           


               

                  


                
 




                           

                             
               
                            




                

        

         

      


       
      
# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~

# IDE
.codelite/
profanity.mk
profanity.project
profanity.workspace
compile_commands.json
.tern-port
.tern-project

# autotools
.libs/
/Makefile
/Makefile.in
_configs.sed
aclocal.m4
autom4te.cache/
build-aux/
config.log
config.status
configure
libprofanity.la
libtool
m4/
**/.deps/
**.dirstamp
src/config.h
src/config.h.in
src/config.h.in~
src/gitversion.h
src/gitversion.h.in
src/stamp-h1
src/plugins/profapi.lo

# binaries
profanity
**/*.o

# test output
tests/functionaltests/functionaltests
tests/functionaltests/functionaltests.log
tests/functionaltests/functionaltests.trs
tests/unittests/unittests
tests/unittests/unittests.log
tests/unittests/unittests.trs
test-suite.log

# local scripts
clean-test.sh
gen_docs.sh
gitpushall.sh

# website files
main_fragment.html
toc_fragment.html

# valgrind files
valgrind.out

# Generate docs
apidocs/python/_build/
apidocs/python/modules.rst
apidocs/python/prof.rst
apidocs/python/src/prof.pyc
apidocs/python/plugin.rst
apidocs/python/src/plugin.pyc
apidocs/c/html/
apidocs/c/doxygen_sqlite3.db

# Temp Vim files
**/*.swp

# Virtual envs
python2/
python3/

.DS_Store
*.bak
breaks

*.tar.*
*.zip
*.log*