summary refs log tree commit diff stats
path: root/doc
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 /doc
parente01be7133607697331b82d35476ac6131e110e1a (diff)
downloadranger-3c2862ea9b84d4f2e4ecd416c0db66db2dad58ba.tar.gz
examples/bash_automatic_cd.sh: use mktemp
This is a follow-up to #282
Diffstat (limited to 'doc')
-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
id='n134' href='#n134'>134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186