summary refs log tree commit diff stats
path: root/doc
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 /doc
parentd1887144750bfa0c9b1b25e019f39e3b31b73481 (diff)
downloadranger-865ae865be6cc8a6621df0fb3db5c68d75e5b647.tar.gz
doc/cd-after-exit: updated
Diffstat (limited to 'doc')
-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
re>b0a216f5 ^
b06433bc ^
2c5ea01d ^
b0a216f5 ^

2c5ea01d ^
2c5ea01d ^
2c5ea01d ^
582f3519 ^
b06433bc ^
582f3519 ^

94c5d83e ^
dee6cfa6 ^
e9e4b4ff ^
b0a216f5 ^


e9e4b4ff ^





ad75190c ^
e9e4b4ff ^
e9e4b4ff ^
25a4162d ^
e9e4b4ff ^
fde932f2 ^
85fd5288 ^
4ade06a6 ^

85fd5288 ^
0c2c782d ^

636d9393 ^
b0a216f5 ^
b06433bc ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78