summary refs log tree commit diff stats
path: root/doc/ranger.pod
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ranger.pod')
-rw-r--r--doc/ranger.pod3
1 files changed, 2 insertions, 1 deletions
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