summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-02-14 13:21:12 +0100
committerhut <hut@lavabit.com>2010-02-14 22:17:00 +0100
commitd1887144750bfa0c9b1b25e019f39e3b31b73481 (patch)
tree413ddeeb3daba1842bae1ce5ef27c332729572ac
parentc44b726eb81795a0310ad1a0a3e54fdc8304fc1c (diff)
downloadranger-d1887144750bfa0c9b1b25e019f39e3b31b73481.tar.gz
ranger.py: reverted cd-after-exit to the old way
This breaks cd-after-exit after Ctrl+C again, but enables
compatibility with zsh which I prefer over the former.

If you only use bash, you can safely revert this commit unless
future changes make it break.
-rwxr-xr-xranger.py11
1 files changed, 1 insertions, 10 deletions
diff --git a/ranger.py b/ranger.py
index b38876ee..758fb5fb 100755
--- a/ranger.py
+++ b/ranger.py
@@ -26,17 +26,8 @@
 if [ $1 ]; then
 	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"
-
-	exec 3<&-
-	trap - INT
+	cd `exec $ranger_exec --cd-after-exit $@ 3>&1 1>&2 2>&3 3>&-`
 	unset ranger_exec
-	unset ranger_output
 else
 	echo "usage: source path/to/ranger.py path/to/ranger.py"
 fi
an class='oid'>ce87c19e ^
b96af395 ^
ce87c19e ^

b96af395 ^
f192d655 ^
b96af395 ^
f192d655 ^
b96af395 ^

77d5b5d6 ^
b96af395 ^


d135851e ^
b96af395 ^
d135851e ^
b96af395 ^

f192d655 ^
b96af395 ^
f192d655 ^
b96af395 ^
77d5b5d6 ^
bc643692 ^
b96af395 ^
d135851e ^

ce87c19e ^

b96af395 ^
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