summary refs log tree commit diff stats
path: root/ranger.py
Commit message (Collapse)AuthorAgeFilesLines
* Do not import unused modules; fix the pylint testsWojciech Siewierski2017-05-061-1/+0
|
* Do not strip the current working directoy from sys.pathWojciech Siewierski2017-05-061-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #861. This code was assuming that cwd is being added to `sys.path` but according to my investigation it isn't true. On the other hand, the script directory is added to `sys.path`, which would be `/usr/bin/` in this case. `/usr/bin/` is neither a vulnerability, nor affected by this code, so I'm removing it. I'm pasting my brief tests of the Python module loading behavior: ``` [root@de5476e76587 test]# tree . ├── main.py └── ranger └── __init__.py 1 directory, 2 files [root@de5476e76587 test]# cat main.py import ranger print("Done") [root@de5476e76587 test]# cat ranger/__init__.py print("I'm a bad module doing bad stuff to good people.") [root@de5476e76587 test]# ./main.py I'm a bad module doing bad stuff to good people. Done [root@de5476e76587 test]# cd ../ [root@de5476e76587 ~]# ./test/main.py I'm a bad module doing bad stuff to good people. Done [root@de5476e76587 ~]# cd - /root/test [root@de5476e76587 test]# mv main.py .. [root@de5476e76587 test]# ../main.py Done [root@de5476e76587 test]# PATH=..:$PATH main.py Done [root@de5476e76587 test]# mv ../main.py . [root@de5476e76587 test]# cd .. [root@de5476e76587 ~]# PATH=$PWD/test:$PATH main.py I'm a bad module doing bad stuff to good people. Done [root@de5476e76587 ~]# ```
* Python 3 division: Import `division` from `__future__`nfnty2017-01-211-1/+1
|
* linting: Python 2 compat: Import from `__future__`nfnty2017-01-171-4/+6
|
* linting: pylint and flake8nfnty2017-01-171-7/+7
|
* Fix mktemp invocation to work on Mac OS X and LinuxJesse Byler2015-06-101-1/+1
| | | | | | | | | | | mktemp on Mac OS X (and probably all BSDs) just returns an error when invoked without any arguments. The -t option used in this change is interpreted differently on Mac OS X and Linux, and is deprecated on Linux, but this invocation works as expected on both. See discussion at https://unix.stackexchange.com/questions/30091 Another alternative would be to use Python's tempfile module: https://docs.python.org/2/library/tempfile.html
* ranger.py: fixed issues with $tempfile in embedded shellEiichi Sato2015-03-281-2/+2
| | | | | | | | | | | | Previously, $tempfile (namely, /tmp/chosendir) was not cleaned up correctly when the ranger process quit in `pwd` without moving to other directory. This causes permission errors in multi-user environments trying to overwrite $tempfile created by a different user. This commit solves the problem in two ways: - Correctly clean up temporary files - Avoid writing to the same temporary by using mktemp(1)
* Neater copyright headerhut2015-03-191-3/+2
|
* update email addresshut2014-12-111-1/+1
|
* Changed email address in source codehut2013-08-081-1/+1
| | | | | Since lavabit.com ceased providing email services, I had to change my address from hut lavabit com to hut lepus uberspace de.
* updated rest of the copyright noticeshut2013-02-221-1/+1
|
* update email address (romanz@lavabit.com -> hut@lavabit.com)hut2013-02-221-1/+1
|
* replaced tabs with 4 spaces in all python fileshut2013-02-101-3/+3
| | | | | | | | | PEP 8 (Style Guide for Python Code) suggests the use of 4 spaces: http://www.python.org/dev/peps/pep-0008/#indentation If you need to use tools like "git blame", you can use the -w option to ignore this commit entirely. Patches will continue to work if you substitute tabs with 4 spaces everywhere except in the Makefile.
* shorten all copyright messages for better readabilityhut2012-03-141-13/+1
|
* Updated copyright headershut2011-10-101-1/+1
| | | | As much as I hate this, it has to be done
* README: polished, removed INSTALLhut2011-10-051-5/+2
|
* ranger.py: made the argument optional in embedded bash scripthut2011-10-041-15/+16
|
* Fixed minor issue in ranger.pyhut2011-10-011-3/+3
|
* another correction of the bash wrapper scriptshut2011-09-281-1/+2
|
* shortened ranger.pyhut2011-09-281-6/+3
|
* sanitized bash wrapper scripts, reformulated BUGS section in manualhut2011-09-281-2/+2
|
* minor optimization in ranger.pyhut2011-09-281-6/+1
|
* improved bash wrappers in ranger.py and man pagehut2011-09-281-5/+7
|
* ranger.py: More reliable check for whether ./ranger.py is startedhut2011-05-071-1/+1
|
* ranger.py: minor change, more general exception handlinghut2011-04-051-1/+1
|
* improved ranger.pyhut2011-04-051-2/+10
|
* Polished ranger.pyhut2010-10-161-3/+3
|
* Small simplification of ranger.pyhut2010-09-291-3/+2
|
* Don't write any bytecode with --clean optionhut2010-09-291-0/+10
|
* ranger.py: Return 0 on success in embedded scripthut2010-09-221-1/+1
|
* simplify ranger.pyhut2010-09-221-25/+11
|
* ranger.py Fixed embedded shellscript (quotes for bash)hut2010-09-111-2/+2
|
* ranger.py: fixed escape in embedded shellscripthut2010-09-111-1/+1
|
* Changed default config dir to $XDG_CONFIG_HOME/rangerhut2010-08-281-1/+5
|
* main: catch SystemExit and return the exit valuehut2010-06-181-2/+3
|
* renamed "--fail-if-run" to the more accurate "--fail-unless-cd"hut2010-06-091-1/+1
| | | | The old name, --fail-if-run, is still valid and working.
* Reverted hashbang for ranger.py.hut2010-06-091-1/+1
| | | | | It causes an error here: /usr/bin/env: python -O: No such file or directory
* Changed hashbang line to "#!/usr/bin/env python"hut2010-06-091-1/+1
|
* Run python with flag "-O" by defaulthut2010-05-101-1/+1
| | | | | This will discard assert statements which are unnecessary for end users.
* Fixed bug #65 by adding flag "--fail-if-run"hut2010-04-261-1/+1
|
* ranger.py: removed whitespacehut2010-04-121-4/+0
|
* reverted a part of 45cf5174. Allow "source ranger ranger" againhut2010-04-011-8/+7
| | | | This is OK since it comes at almost no cost
* removed the cd-after-exit hackhut2010-03-291-13/+8
| | | | | | | | | Fear not. You still get the same functionality by using a function like: ranger() { $(which ranger) $@ && cd "$(grep \^\' ~/.ranger/bookmarks | cut -b3-)" }
* ranger.__init__: don't implicitly import ranger.__main__hut2010-03-261-1/+1
|
* Changed license to the GNU General Public Licensehut2010-02-281-12/+14
|
* ranger.py: fixed cd-after-exit with spaces in directoryhut2010-02-241-1/+1
|
* ranger.py: removed unnecessary codehut2010-02-151-1/+1
|
* ranger.py: reverted cd-after-exit to the old wayhut2010-02-141-10/+1
| | | | | | | | This breaks cd-after-exit after Ctrl+C again, but enables compatibility with zsh which I prefer over the former. If you only use bash, you can safely revert this commit unless future changes make it break.
* ranger.py: more simple '--debug' flag checkhut2010-02-141-1/+1
|
* ranger.py: improved handling of bad importhut2010-01-261-1/+2
|