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 BA6F0159C9C for ; Mon, 5 Aug 2024 02:02:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 893DEE2A7D; Mon, 5 Aug 2024 02:02:17 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 74395E2A7D for ; Mon, 5 Aug 2024 02:02:17 +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 AF636340C7C for ; Mon, 5 Aug 2024 02:02:16 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 061271E5D for ; Mon, 5 Aug 2024 02:02:15 +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: <1722646322.23e3f65f2723f80c335d9309629439c27080b29f.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: 23e3f65f2723f80c335d9309629439c27080b29f X-VCS-Branch: master Date: Mon, 5 Aug 2024 02:02:15 +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: 47760ddd-eb7b-423e-987c-0d8ae8f6f231 X-Archives-Hash: 4e60dc9547d626bb0fdc13d12a6cdea6 commit: 23e3f65f2723f80c335d9309629439c27080b29f Author: Kerin Millar plushkava net> AuthorDate: Sat Aug 3 00:52:02 2024 +0000 Commit: Sam James gentoo org> CommitDate: Sat Aug 3 00:52:02 2024 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=23e3f65f Alter a variable name in quote_args() Now that POSIX-1.2024 has been ratified, strictly_posix no longer makes sense as a variable name. Signed-off-by: Kerin Millar plushkava.net> functions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions.sh b/functions.sh index 7dd4d8f..94114cc 100644 --- a/functions.sh +++ b/functions.sh @@ -380,14 +380,14 @@ quote_args() seq_by["\134"] = "\\" } BEGIN { - strictly_posix = length(ENVIRON["POSIXLY_CORRECT"]) + issue = length(ENVIRON["POSIXLY_CORRECT"]) ? 7 : 8; argc = ARGC ARGC = 1 for (arg_idx = 1; arg_idx < argc; arg_idx++) { arg = ARGV[arg_idx] if (arg == q) { word = "\\" q - } else if (strictly_posix || arg !~ /[\001-\037\177-\377]/) { + } else if (issue < 8 || arg !~ /[\001-\037\177-\377]/) { gsub(q, q "\\" q q, arg) word = q arg q } else {