summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--twopane.bash6
1 files changed, 4 insertions, 2 deletions
diff --git a/twopane.bash b/twopane.bash
index 59b8d4b..b40f248 100644
--- a/twopane.bash
+++ b/twopane.bash
@@ -17,7 +17,8 @@ caption string '%t'
17layout new 17layout new
18split 18split
19focus top 19focus top
20screen -ln -t 'output' 0 sh -c 'socat -U STDOUT UNIX-RECV:"$TWOPANE"/socket; screen -X quit' 20screen -ln -t 'output' bash -i
21exec :!:| socat -U STDOUT UNIX-RECV:"$TWOPANE"/socket
21title 'output' 22title 'output'
22focus bottom 23focus bottom
23resize 8 24resize 8
@@ -31,7 +32,7 @@ layout save 0
31cat > "$TWOPANE"/bashrc <<'.' 32cat > "$TWOPANE"/bashrc <<'.'
32set -e 33set -e
33trap "screen -X quit" EXIT 34trap "screen -X quit" EXIT
34coproc socat -u SYSTEM:"bash -i",pty,ctty,setsid,stderr,cloexec=0 UNIX-SENDTO:"$TWOPANE"/socket 35coproc socat -u STDIN,cloexec=0 UNIX-SENDTO:"$TWOPANE"/socket
35exec 30>&${COPROC[1]} 36exec 30>&${COPROC[1]}
36send() 37send()
37{ 38{
@@ -49,6 +50,7 @@ sleep 1
49send top 50send top
50export -f send sendc 51export -f send sendc
51bash -i || true 52bash -i || true
53sendc q
52send echo hello world3 54send echo hello world3
53sleep 1 55sleep 1
54. 56.