From 3c2862ea9b84d4f2e4ecd416c0db66db2dad58ba Mon Sep 17 00:00:00 2001 From: hut Date: Thu, 9 Apr 2015 16:37:50 +0200 Subject: examples/bash_automatic_cd.sh: use mktemp This is a follow-up to #282 --- doc/examples/bash_automatic_cd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit 1.4.1-2-gfad0