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