summary refs log tree commit diff stats
path: root/ranger.py
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-03-29 20:10:20 +0200
committerhut <hut@lavabit.com>2010-03-29 20:10:20 +0200
commit45cf5174fef40415ac270a6c64a388a8994dcff9 (patch)
tree7710c43adbe1b57be87d4fa5e717a2efdf33c28f /ranger.py
parente71c8103458d9f1ae3cad73ff3d97876ca5a58a8 (diff)
downloadranger-45cf5174fef40415ac270a6c64a388a8994dcff9.tar.gz
removed the cd-after-exit hack
Fear not. You still get the same functionality by using a function like:

ranger() {
    $(which ranger) $@ &&
    cd "$(grep \^\' ~/.ranger/bookmarks | cut -b3-)"
}
Diffstat (limited to 'ranger.py')
-rwxr-xr-xranger.py21
1 files changed, 8 insertions, 13 deletions
diff --git a/ranger.py b/ranger.py
index 0a9d54c9..1c06f125 100755
--- a/ranger.py
+++ b/ranger.py
@@ -19,20 +19,15 @@
 #
 # ----------------------------------------------------------------------------
 #
-# An embedded shell script. It allows you to change the directory
-# of the parent shell to the last visited directory in ranger after exit.
-# For more information, check out doc/cd-after-exit.txt
-# To enable this, start ranger with:
-#     source /path/ranger /path/ranger
+# An embedded shell script for backwards compatibility.
 """":
-if [ $1 ]; then
-	ranger_exec="$1"
-	shift
-	cd "`exec $ranger_exec --cd-after-exit $@ 3>&1 1>&2 2>&3 3>&-`"
-	unset ranger_exec
-else
-	echo "usage: source path/to/ranger.py path/to/ranger.py"
-fi
+echo "Warning: the cd-after-exit feature has been removed."
+echo "You can get the functionality by using such a function:"
+echo 'ranger() {'
+echo '    $(which ranger) $@ &&'
+echo '    cd "$(grep \^\'"'"' ~/.ranger/bookmarks | cut -b3-)"'
+echo '}'
+$1
 return 1
 """