diff options
author | hut <hut@lepus.uberspace.de> | 2015-04-09 16:36:09 +0200 |
---|---|---|
committer | hut <hut@lepus.uberspace.de> | 2015-04-09 16:36:09 +0200 |
commit | e01be7133607697331b82d35476ac6131e110e1a (patch) | |
tree | 2af796b3049b3cc672af579c6a97f2871d5d5585 | |
parent | 05eb02687f8d06fd5c334f11e21a44bd3243bbba (diff) | |
parent | e2393938bf56f2bd6b93ea11e9282cf6d40a2514 (diff) | |
download | ranger-e01be7133607697331b82d35476ac6131e110e1a.tar.gz |
Merge branch 'feature/fix-embedded-shell' of git://github.com/eiiches/ranger
-rwxr-xr-x | ranger.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ranger.py b/ranger.py index 4b2e7daa..1d7e42e1 100755 --- a/ranger.py +++ b/ranger.py @@ -9,7 +9,7 @@ # default is simply "ranger". (Not this file itself!) # The other arguments are passed to ranger. """": -tempfile='/tmp/chosendir' +tempfile="$(mktemp)" ranger="${1:-ranger}" test -z "$1" || shift "$ranger" --choosedir="$tempfile" "${@:-$(pwd)}" @@ -17,8 +17,8 @@ returnvalue=$? test -f "$tempfile" && if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then cd "$(cat "$tempfile")" - rm -f -- "$tempfile" fi +rm -f -- "$tempfile" return $returnvalue """ and None |