From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8FF6E15800F for ; Sun, 19 Feb 2023 16:14:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6E747E08E0; Sun, 19 Feb 2023 16:14:36 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 55AD5E08E0 for ; Sun, 19 Feb 2023 16:14:36 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 72075340EC7 for ; Sun, 19 Feb 2023 16:14:35 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7928B8BB for ; Sun, 19 Feb 2023 16:14:32 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1676823247.47a622418d5745d15d6b47ec2c63ab060e39dd25.sam@gentoo> Subject: [gentoo-commits] proj/gentoo-functions:master commit in: / X-VCS-Repository: proj/gentoo-functions X-VCS-Files: functions.sh X-VCS-Directories: / X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 47a622418d5745d15d6b47ec2c63ab060e39dd25 X-VCS-Branch: master Date: Sun, 19 Feb 2023 16:14:32 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 7ba346eb-c21c-4cbd-9438-ced31c8e0727 X-Archives-Hash: 05384e771ea3eb665eda3404f9b30be1 commit: 47a622418d5745d15d6b47ec2c63ab060e39dd25 Author: Kerin Millar plushkava net> AuthorDate: Sat Feb 18 11:00:09 2023 +0000 Commit: Sam James gentoo org> CommitDate: Sun Feb 19 16:14:07 2023 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=47a62241 Precede end columns with a single space, not two, in _eend() A beneficial effect of doing so, apart from being able to show one more character, is that the the associated arithmetic expansions uniformly work with the genuine length of the end column, which is 7. Signed-off-by: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> functions.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/functions.sh b/functions.sh index beaef03..c287b24 100644 --- a/functions.sh +++ b/functions.sh @@ -253,10 +253,10 @@ _eend() fi if [ "${is_tty}" -eq 1 ] && [ -n "${genfun_endcol}" ]; then - printf '%s %s\n' "${genfun_endcol}" "${msg}" + printf '%s %s\n' "${genfun_endcol}" "${msg}" else [ "${genfun_lastcall}" = ebegin ] || genfun_lastbegun_strlen=0 - printf "%$(( cols - genfun_lastbegun_strlen - 6 ))s%s\n" '' "${msg}" + printf "%$(( cols - genfun_lastbegun_strlen - 7 ))s %s\n" '' "${msg}" fi return "${retval}" @@ -536,8 +536,8 @@ done # Set an ECMA-48 CSI sequence, allowing for eend to line up the [ ok ] string. { genfun_endcol="$(tput cuu1)" \ - && genfun_endcol="${genfun_endcol}$(tput cuf -- "$(( genfun_cols - 8 ))")" \ - || genfun_endcol="$(printf '\033[A\033[%dC' "$(( genfun_cols - 8 ))")" + && genfun_endcol="${genfun_endcol}$(tput cuf -- "$(( genfun_cols - 7 ))")" \ + || genfun_endcol="$(printf '\033[A\033[%dC' "$(( genfun_cols - 7 ))")" } 2>/dev/null # Setup the colors so our messages all look pretty