summary refs log tree commit diff stats
path: root/ranger.py
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-09-28 23:05:15 +0200
committerhut <hut@lavabit.com>2011-09-28 23:05:15 +0200
commitea2dd9974b5b25a206048b2747e9184c3e875f8d (patch)
tree3ab90df72957c2f72993d1de12a5615ed224e130 /ranger.py
parent4833bc2383e30ccd3fb500497e9d1af7d056f066 (diff)
downloadranger-ea2dd9974b5b25a206048b2747e9184c3e875f8d.tar.gz
sanitized bash wrapper scripts, reformulated BUGS section in manual
Diffstat (limited to 'ranger.py')
-rwxr-xr-xranger.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ranger.py b/ranger.py
index cc402a44..f4962093 100755
--- a/ranger.py
+++ b/ranger.py
@@ -23,9 +23,9 @@ if [ ! -z "$1" ]; then
 	ranger="$1"
 	shift
 	"$ranger" --choosedir="$tempfile" "${@:-$(pwd)}"
-	if [ -f "$tempfile" -a "$(cat "$tempfile")" != "$(pwd | tr -d "\n")" ]; then
+	if [ -f "$tempfile" -a "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then
 		cd "$(cat "$tempfile")"
-		rm "$tempfile"
+		rm -f -- "$tempfile"
 	fi && return 0
 else
 	echo "usage: source path/to/ranger.py path/to/ranger.py"