summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2015-04-09 16:37:50 +0200
committerhut <hut@lepus.uberspace.de>2015-04-09 16:37:50 +0200
commit3c2862ea9b84d4f2e4ecd416c0db66db2dad58ba (patch)
treebe12757cf6e0f373b16e9accc756db7bfc098131
parente01be7133607697331b82d35476ac6131e110e1a (diff)
downloadranger-3c2862ea9b84d4f2e4ecd416c0db66db2dad58ba.tar.gz
examples/bash_automatic_cd.sh: use mktemp
This is a follow-up to #282
-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