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 EFC7015806E for ; Wed, 7 Jun 2023 11:13:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 151B2E0874; Wed, 7 Jun 2023 11:13:39 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 F2C00E0874 for ; Wed, 7 Jun 2023 11:13:38 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3863C340D40 for ; Wed, 7 Jun 2023 11:13:38 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7D3CEA8A for ; Wed, 7 Jun 2023 11:13:36 +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: <1686136338.bf2c509abfe1bcd2835531861425d2f33c06e13e.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: bf2c509abfe1bcd2835531861425d2f33c06e13e X-VCS-Branch: master Date: Wed, 7 Jun 2023 11:13:36 +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: e4e65226-411e-44b9-ab5c-1a1aa3192d22 X-Archives-Hash: 2764fc5f38b74ec3d49b485d7aeb38e6 commit: bf2c509abfe1bcd2835531861425d2f33c06e13e Author: Kerin Millar plushkava net> AuthorDate: Fri Feb 24 19:27:32 2023 +0000 Commit: Sam James gentoo org> CommitDate: Wed Jun 7 11:12:18 2023 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=bf2c509a Drop support for the checkwinsize feature of bash While there is nothing wrong with the way in which it is presently being used, the feature is sufficiently bug-ridden that it will not work correctly with the impending overhaul of the _eprint() and _eend() functions. As such, drop support for it in advance. Chet has pledged to treat my bug report as a feature request, so it may yet be possible to re-introduce support for it in the future. Signed-off-by: Kerin Millar plushkava.net> Bug: https://lists.gnu.org/archive/html/bug-bash/2023-02/msg00142.html Signed-off-by: Sam James gentoo.org> functions.sh | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/functions.sh b/functions.sh index 78317b3..44a6dce 100644 --- a/functions.sh +++ b/functions.sh @@ -512,19 +512,9 @@ else fi # Try to determine the number of available columns in the terminal. -for _ in 1 2 3; do +for _ in 1 2; do case $_ in 1) - # Running an external command causes bash >=4.3 to set - # the COLUMNS variable, provided that the checkwinsize - # shopt is enabled. As of 5.0, it's enabled by default. - # shellcheck disable=3044 - if [ -n "${BASH}" ] && shopt -s checkwinsize 2>/dev/null; then - /bin/true - fi - genfun_cols=${COLUMNS} - ;; - 2) # This use of stty(1) is portable as of POSIX Issue 8. genfun_cols=$( stty size 2>/dev/null | { @@ -534,7 +524,7 @@ for _ in 1 2 3; do } ) ;; - 3) + 2) # Give up and assume 80 available columns. genfun_cols=80 break