about summary refs log tree commit diff stats
path: root/ranger/core/helper.py
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-02-15 01:03:59 +0000
committerhut <hut@lavabit.com>2011-02-15 01:03:59 +0000
commitd008817c6d3ea828e12bed2c271c9ae36f80cbda (patch)
tree49e62d666d8f7432d1769e757baca051891505ea /ranger/core/helper.py
parent9a2ec2b421e87e815806b4a7ae7452fb84f2027e (diff)
downloadranger-d008817c6d3ea828e12bed2c271c9ae36f80cbda.tar.gz
Added --choosedir, a more logical alternative to --fail-unless-cd
also updated the bash script in README to use the new option
Diffstat (limited to 'ranger/core/helper.py')
-rw-r--r--ranger/core/helper.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/ranger/core/helper.py b/ranger/core/helper.py
index 249b4c5c..cb0afefe 100644
--- a/ranger/core/helper.py
+++ b/ranger/core/helper.py
@@ -69,6 +69,9 @@ def parse_arguments():
 			help="Makes ranger act like a file chooser. When opening "
 			"a file, it will quit and write the name of the selected "
 			"file to TARGET.")
+	parser.add_option('--choosedir', type='string', metavar='TARGET',
+			help="Makes ranger act like a directory chooser. When ranger quits"
+			", it will write the name of the last visited directory to TARGET")
 
 	options, positional = parser.parse_args()
 	arg = OpenStruct(options.__dict__, targets=positional)