summary refs log tree commit diff stats
path: root/ranger.py
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-04-07 15:50:08 +0200
committerhut <hut@lavabit.com>2010-04-07 15:50:08 +0200
commit8d89c6f3a7cf6b0c8abc2ff68ecc7201ac08e872 (patch)
tree610dd3acfdac10ebe1d766a779897207ea6dfb33 /ranger.py
parent55435343b142c424619e3072475ca8b3366d109c (diff)
parentf45f9734d2ff9fd6b68ff6c879d5b07b0e5c7d02 (diff)
downloadranger-8d89c6f3a7cf6b0c8abc2ff68ecc7201ac08e872.tar.gz
Merge branch 'devel' into newkey
Conflicts:
	ranger/core/actions.py
	ranger/defaults/keys.py
	ranger/ext/direction.py
	ranger/gui/ui.py
	ranger/gui/widgets/browserview.py
	ranger/gui/widgets/pager.py
Diffstat (limited to 'ranger.py')
-rwxr-xr-xranger.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/ranger.py b/ranger.py
index 9703b243..636bd384 100755
--- a/ranger.py
+++ b/ranger.py
@@ -20,16 +20,10 @@
 # ----------------------------------------------------------------------------
 #
 # 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
+# after you exit ranger by starting it with: source ranger ranger
 """":
 if [ $1 ]; then
-	ranger_exec="$1"
-	shift
-	cd "`exec $ranger_exec --cd-after-exit $@ 3>&1 1>&2 2>&3 3>&-`"
-	unset ranger_exec
+	$@ && cd "$(grep \^\' ~/.ranger/bookmarks | cut -b3-)"
 else
 	echo "usage: source path/to/ranger.py path/to/ranger.py"
 fi
@@ -45,7 +39,7 @@ __doc__ = """Ranger - file browser for the unix terminal"""
 # is neither in the same directory as this file, nor in one of
 # pythons global import paths.
 try:
-	from ranger import main
+	from ranger.__main__ import main
 
 except ImportError:
 	import sys