summaryrefslogtreecommitdiff
path: root/utils/lib.sh
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2021-06-27 11:48:57 +0200
committerMarkus Heiser <markus.heiser@darmarit.de>2021-06-27 11:48:57 +0200
commit2a12637f5980d6b8997bd8e67e96e1e433061144 (patch)
tree5c73c71475bf85423ddc8ca327faa6367bfa45df /utils/lib.sh
parent4b60c557a943622ad22bf819b1c81f7725830b99 (diff)
[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 <markus.heiser@darmarit.de>
Diffstat (limited to 'utils/lib.sh')
-rwxr-xr-xutils/lib.sh2
1 files changed, 2 insertions, 0 deletions
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() {