summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-02-14 13:27:54 +0100
committerhut <hut@lavabit.com>2010-02-14 22:17:00 +0100
commit865ae865be6cc8a6621df0fb3db5c68d75e5b647 (patch)
tree6953133a4a8377df4c0b621ae1d55bebbefd6202
parentd1887144750bfa0c9b1b25e019f39e3b31b73481 (diff)
downloadranger-865ae865be6cc8a6621df0fb3db5c68d75e5b647.tar.gz
doc/cd-after-exit: updated
-rw-r--r--doc/cd-after-exit.txt36
1 files changed, 15 insertions, 21 deletions
diff --git a/doc/cd-after-exit.txt b/doc/cd-after-exit.txt
index c67b5241..5e54fee0 100644
--- a/doc/cd-after-exit.txt
+++ b/doc/cd-after-exit.txt
@@ -37,7 +37,7 @@ which is directly integrated in to the shell and can not be run this way.
 
 The only way I found is using cd `program` from inside the shell to change
 the directory to whatever `program` prints to the stdout:
-    
+
     bash$ cd `echo ..`
 
 Since the user interface still has to be printed, we simply redirect it to
@@ -120,26 +120,6 @@ A convenient way of using this feature is adding this line to your bashrc:
     alias rn='source ranger ranger'
 
 
-== Keyboard interrupt handling
-
-Another thing: If Ctrl+C is pressed anywhere in the program, the execution
-of the sourced shell script is stopped and the feature stops working.
-
-To handle that, I use: trap "" INT
-This ignores all interrupt signals. However, since ranger needs to know
-about ^C presses, I use this approach:
-
-    ranger_exec="$1"
-    shift
-    trap "" INT
-    exec 3< <($ranger_exec --cd-after-exit $@ 3>&1 1>&2 2>&3 3>&-)
-    while read ranger_output; do false; done <&3
-    cd "$ranger_output"
-    #...and some clean ups
-
-(this breaks zsh support!)
-
-
 == Open issues
 
 Unfortunately there is some redundancy: you have to type the path to ranger
@@ -155,5 +135,19 @@ Example:
 
 If you find a way to make this print out 'sourced.sh', let me know. :)
 
+Another thing: If Ctrl+C is pressed anywhere in the program, the execution
+of the sourced shell script is stopped and the feature stops working.
+
+This was handled by using a script like that:
+
+    ranger_exec="$1"
+    shift
+    trap "" INT
+    exec 3< <($ranger_exec --cd-after-exit $@ 3>&1 1>&2 2>&3 3>&-)
+    while read ranger_output; do false; done <&3
+    cd "$ranger_output"
+    #...and some clean ups
+
+but that won't work in zsh for some reason, so I took it out again.
 
 Dec 25, 2009
='#n197'>197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291