From 83868c7aa8ca35d9d0c1606dd62b44e97bd7e356 Mon Sep 17 00:00:00 2001 From: hut Date: Mon, 26 Apr 2010 13:32:40 +0200 Subject: Fixed bug #65 by adding flag "--fail-if-run" --- doc/ranger.1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ranger.1 b/doc/ranger.1 index 68353dd9..b197d774 100644 --- a/doc/ranger.1 +++ b/doc/ranger.1 @@ -33,6 +33,10 @@ Activate the clean mode: Ranger will not access or create any configuration files nor will it leave any traces on your system. This is useful when your configuration is broken, when you want to avoid clutter, etc. .TP +--fail-if-run +Return the exit code 1 if ranger is used to run a file, for example with +`ranger --fail-if-run filename`. This can be useful for scripts. +.TP -r \fIdir\fR, --confdir=\fIdir\fR Define a different configuration directory. The default is $HOME/.ranger. .TP @@ -172,7 +176,7 @@ of your parent shell after exiting ranger: .nf ranger() { - command ranger $@ && + command ranger --fail-if-run $@ && cd "$(grep \\^\\' ~/.ranger/bookmarks | cut -b3-)" } .\"----------------------------------------- -- cgit 1.4.1-2-gfad0