From 28c3819e2dde25488bf5d6d58cce507c6ee10adf Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 28 Sep 2026 11:56:42 +0200 Subject: [PATCH] shellpresent: Keep tty for executed commands --- shellpresent | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/shellpresent b/shellpresent index b0758f7..fcf1ba0 100755 --- a/shellpresent +++ b/shellpresent @@ -39,7 +39,7 @@ fi clear echo -en "\e[${PROMPT}m\$\e[${CMD}m " -while read line; do +while IFS= read -r line <&3; do # paragraph clears screen if [ -z "$line" ]; then clear @@ -58,9 +58,9 @@ while read line; do # execute command echo -n "$line" - read < /dev/tty + read echo -ne "\e[${OUTPUT}m" - eval "$line" + eval "$line" 3<&- echo -en "\n\e[${PROMPT}m\$\e[${CMD}m " - read -s < /dev/tty -done < "$1" + read -s +done 3< "$1" -- 2.47.3