summary refs log tree commit diff stats
path: root/ranger.py
blob: 864acf276680dbce9c4acde62197e3407987932b (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
#!/usr/bin/python -O
# This file is part of ranger, the console file manager.  (coding: utf-8)
# License: GNU GPL version 3, see the file "AUTHORS" for details.

# =====================
# This embedded bash script can be executed by sourcing this file.
# It will cd to ranger's last location after you exit it.
# The first argument specifies the command to run ranger, the
# default is simply "ranger". (Not this file itself!)
# The other arguments are passed to ranger.
"""":
tempfile="$(mktemp -t tmp.XXXXXX)"
ranger="${1:-ranger}"
test -z "$1" || shift
"$ranger" --choosedir="$tempfile" "${@:-$(pwd)}"
returnvalue=$?
test -f "$tempfile" &&
if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then
    cd "$(cat "$tempfile")"
fi
rm -f -- "$tempfile"
return $returnvalue
""" and None

import sys
from os.path import exists, abspath

# Need to find out whether or not the flag --clean was used ASAP,
# because --clean is supposed to disable bytecode compilation
argv = sys.argv[1:sys.argv.index('--')] if '--' in sys.argv else sys.argv[1:]
sys.dont_write_bytecode = '-c' in argv or '--clean' in argv

# Don't import ./ranger when running an installed binary at /usr/.../ranger
if __file__[:4] == '/usr' and exists('ranger') and abspath('.') in sys.path:
    sys.path.remove(abspath('.'))

# Start ranger
import ranger
sys.exit(ranger.main())
268723957f235edcff7b45fd41b04ccab27'>072bc26 ^
8d20e92 ^
0c2ede5 ^
072bc26 ^
3836d24 ^
56b84d3 ^
ab79bc3 ^
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
                               
 

       
         
                                                                     
                                                                  
                                                                          
                                                     
                                                                          
                                                 

                                                                           


                                                                      
                                     
                                                                  

                                                                                   
                                                                         
                                         
                                            
                                                                         
                                              
                                    
                                                                      
                                                              
                                                                                        
                                          
                                                                       
                                           
 
 
                                                                                                
module git.sr.ht/~sircmpwn/aerc

go 1.12

require (
	git.sr.ht/~sircmpwn/getopt v0.0.0-20190609193657-e7e23d1cd3a3
	git.sr.ht/~sircmpwn/pty v0.0.0-20190330154901-3a43678975a9
	github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964
	github.com/davecgh/go-spew v1.1.1 // indirect
	github.com/ddevault/go-libvterm v0.0.0-20190526194226-b7d861da3810
	github.com/emersion/go-imap v1.0.0-beta.6
	github.com/emersion/go-imap-idle v0.0.0-20190519112320-2704abd7050e
	github.com/emersion/go-message v0.10.3
	github.com/emersion/go-sasl v0.0.0-20190520160400-47d427600317
	github.com/emersion/go-smtp v0.11.1
	github.com/gdamore/tcell v1.1.2
	github.com/go-ini/ini v1.42.0
	github.com/google/shlex v0.0.0-20181106134648-c34317bd91bf
	github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c // indirect
	github.com/kyoh86/xdg v1.0.0
	github.com/martinlindhe/base36 v0.0.0-20190418230009-7c6542dfbb41
	github.com/mattn/go-isatty v0.0.8
	github.com/mattn/go-runewidth v0.0.4
	github.com/miolini/datacounter v0.0.0-20171104152933-fd4e42a1d5e0
	github.com/mitchellh/go-homedir v1.1.0
	github.com/pkg/errors v0.8.1
	github.com/riywo/loginshell v0.0.0-20181227004642-c2f4167b2303
	github.com/smartystreets/assertions v1.0.0 // indirect
	github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a // indirect
	github.com/stretchr/testify v1.3.0
	golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed // indirect
	gopkg.in/ini.v1 v1.42.0 // indirect
)

replace github.com/gdamore/tcell => git.sr.ht/~sircmpwn/tcell v0.0.0-20190616032858-1f7dcc638286