From b16025c5306fbd7e4f87c1fdc2c908dd20556cdf Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 29 Dec 2025 14:01:15 +0100 Subject: [PATCH] alias.bash: restore `|| echo 0` sequence after `tput colors` In commit 983fd43c3d4cd687bca1802577a98930e1b23d88, `tput colors` was always followed by `|| echo 0`, because tput does not output anything if there are no definitions for the current $TERM value. This got lost in commit 5486aadee23a19422cc54064dc6c95ee47f87cf8. --- files/usr/etc/profile.d/alias.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/usr/etc/profile.d/alias.bash b/files/usr/etc/profile.d/alias.bash index a73d1d62..70590d55 100644 --- a/files/usr/etc/profile.d/alias.bash +++ b/files/usr/etc/profile.d/alias.bash @@ -24,7 +24,7 @@ if test "$is" != "ksh" ; then alias -- -='popd' fi alias rd=rmdir -if type -p tput >/dev/null 2>&1 && test -n "$TERM" -a -t 1 && test "$(tput colors)" -ge 8 ; then +if type -p tput >/dev/null 2>&1 && test -n "$TERM" -a -t 1 && test "$(tput colors || echo 0)" -ge 8 ; then alias egrep='grep -E --color=auto' alias fgrep='grep -F --color=auto' alias grep='grep --color=auto'