summary refs log tree commit diff stats
path: root/doc/examples/bash_automatic_cd.sh
diff options
context:
space:
mode:
Diffstat (limited to 'doc/examples/bash_automatic_cd.sh')
-rw-r--r--doc/examples/bash_automatic_cd.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/examples/bash_automatic_cd.sh b/doc/examples/bash_automatic_cd.sh
index 8d72c553..465c9c80 100644
--- a/doc/examples/bash_automatic_cd.sh
+++ b/doc/examples/bash_automatic_cd.sh
@@ -8,7 +8,7 @@
 # original directory.
 
 function ranger-cd {
-    tempfile='/tmp/chosendir'
+    tempfile="$(mktemp)"
     /usr/bin/ranger --choosedir="$tempfile" "${@:-$(pwd)}"
     test -f "$tempfile" &&
     if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then