From bdc872b0178be74059f49d8878b5c05f2d7ed8ce Mon Sep 17 00:00:00 2001 From: hut Date: Wed, 28 Sep 2011 23:38:23 +0200 Subject: another correction of the bash wrapper scripts --- doc/ranger.pod | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc/ranger.pod') diff --git a/doc/ranger.pod b/doc/ranger.pod index ddd8dada..e5cd8987 100644 --- a/doc/ranger.pod +++ b/doc/ranger.pod @@ -785,7 +785,8 @@ original one. function ranger-cd { tempfile='/tmp/chosendir' /usr/bin/ranger --choosedir="$tempfile" "${@:-$(pwd)}" - if [ -f "$tempfile" -a "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then + test -f "$tempfile" && + if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then cd -- "$(cat "$tempfile")" rm -f -- "$tempfile" fi -- cgit 1.4.1-2-gfad0