commit: 008c88e05d15b19a80a55863d9c71709a0b61216
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Wed Feb 15 08:14:01 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Feb 15 08:17:56 2023 +0000
URL:
https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=008c88e0
Do not try to account for genfun_endcol being unset
To do so was very briefly useful but rendered obsolete by the commit
that introduced "proper TTY detection". Since then, the distinction
between genfun_endcol being unset or merely empty has been immaterial.
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>
functions.sh | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/functions.sh b/functions.sh
index 6b11645..ad2a551 100644
--- a/functions.sh
+++ b/functions.sh
@@ -475,9 +475,6 @@ EINFO_VERBOSE="${EINFO_VERBOSE:-no}"
# Should we use color?
RC_NOCOLOR="${RC_NOCOLOR:-no}"
-# Can the terminal handle endcols? Begin by assuming not.
-unset -v genfun_endcol
-
# Set the initial value for e-message indentation.
genfun_indent=
@@ -519,12 +516,10 @@ else
fi
fi
-if [ -z "${genfun_endcol+set}" ]; then
- if hash tput 2>/dev/null; then
- genfun_endcol="$(tput cuu1)$(tput cuf $(( genfun_cols - 8 )) )"
- else
- genfun_endcol='\033[A\033['$(( genfun_cols - 8 ))'C'
- fi
+if hash tput 2>/dev/null; then
+ genfun_endcol="$(tput cuu1)$(tput cuf $(( genfun_cols - 8 )) )"
+else
+ genfun_endcol='\033[A\033['$(( genfun_cols - 8 ))'C'
fi
# Setup the colors so our messages all look pretty