From 77fdb8c5e0a40ae3adddf470567868a6a93a1102 Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Wed, 14 Aug 2024 17:02:21 -0400 Subject: use block syntax for temporarily redirecting stderr --- twopane.bash | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/twopane.bash b/twopane.bash index 6322b69..99e0717 100755 --- a/twopane.bash +++ b/twopane.bash @@ -229,9 +229,10 @@ forward() # characters with carrot-encoding like '^[' etc). exec {STDIN}<&0 {STDOUT}>&1 {STDERR}>&2 exec {TEE}> >(tee >(output_filter | soft_cursor >&$STDOUT) >&$stdout) - exec 2>/dev/null - socat FD:$STDIN,cfmakeraw,opost=1,onlcr=1!!STDOUT - <&$stdin >&$TEE 2>&$STDERR & - exec 2>&$STDERR + stty=cfmakeraw,opost=1,onlcr=1 + { + socat FD:$STDIN,$stty!!STDOUT - <&$stdin >&$TEE 2>&$STDERR & + } 2>/dev/null FORWARD_PID=$! printf '%s\n' "#!/bin/bash" "kill $!" "screen -X focus bottom" > "$TWOPANE"/unforward chmod +x "$TWOPANE"/unforward -- cgit v1.2.3