summary refs log tree commit diff stats
path: root/ranger.py
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-10-05 21:30:15 +0200
committerhut <hut@lavabit.com>2010-10-05 21:30:15 +0200
commit258a2668e6cdd34351979b8da17c6e66a738996e (patch)
treecd3406c2198daced1f12cb11c4091fa1ed99dd4c /ranger.py
parentdc7ee19fc15eee33c948d0ccd6c06df9682c0bf3 (diff)
parentd3bcb234bf5776da7d9b66e73107e906342eeb7d (diff)
downloadranger-258a2668e6cdd34351979b8da17c6e66a738996e.tar.gz
Merge branch 'stable' into preview
Conflicts:
	ranger/shared/settings.py
Diffstat (limited to 'ranger.py')
-rwxr-xr-xranger.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/ranger.py b/ranger.py
index f290d796..5652ba69 100755
--- a/ranger.py
+++ b/ranger.py
@@ -23,7 +23,11 @@
 # after you exit ranger by starting it with: source ranger ranger
 """":
 if [ $1 ]; then
-	$@ --fail-unless-cd && cd "$(grep \^\' ~/.ranger/bookmarks | cut -b3-)"
+	if [ -z "$XDG_CONFIG_HOME" ]; then
+		"$@" --fail-unless-cd && cd "$(grep \^\' ~/.config/ranger/bookmarks | cut -b3-)"
+	else
+		"$@" --fail-unless-cd && cd "$(grep \^\' "$XDG_CONFIG_HOME"/ranger/bookmarks | cut -b3-)"
+	fi
 else
 	echo "usage: source path/to/ranger.py path/to/ranger.py"
 fi