From 2a12637f5980d6b8997bd8e67e96e1e433061144 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Sun, 27 Jun 2021 11:48:57 +0200 Subject: [PATCH] [fix] utils/lib.sh: prefix_stdout show cursor (ANSI escape \e[?25h) Some piped commands hide the cursor, show cursory when the stream ends. Most often this is a bug of the command which piped. The command should not hide the cursor when it writes to a pipe. I have seen this bug with the package manager (pacman) from ArchLinux. Signed-off-by: Markus Heiser --- utils/lib.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/lib.sh b/utils/lib.sh index 8867bfe8e..b75e3376b 100755 --- a/utils/lib.sh +++ b/utils/lib.sh @@ -270,6 +270,8 @@ prefix_stdout () { (while IFS= read line; do echo -e "${prefix}$line" done) + # some piped commands hide the cursor, show cursory when the stream ends + echo -en "\e[?25h" } append_line() {