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 D6D541581D3 for ; Wed, 22 May 2024 01:12:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C17D4E2A32; Wed, 22 May 2024 01:12:26 +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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9EA5FE2A32 for ; Wed, 22 May 2024 01:12:26 +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 90A3E335D6E for ; Wed, 22 May 2024 01:12:25 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E3B4F1AFC for ; Wed, 22 May 2024 01:12:23 +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: <1716191405.1515b614f83bc30fe1ed63d6a76bf4ede0b5c2f8.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: 1515b614f83bc30fe1ed63d6a76bf4ede0b5c2f8 X-VCS-Branch: master Date: Wed, 22 May 2024 01:12:23 +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: 8f9be2af-588c-41bd-aa25-c2de283a74d8 X-Archives-Hash: 94d90fe39c887e340b99f248df62a0be commit: 1515b614f83bc30fe1ed63d6a76bf4ede0b5c2f8 Author: Kerin Millar plushkava net> AuthorDate: Sun May 19 22:03:53 2024 +0000 Commit: Sam James gentoo org> CommitDate: Mon May 20 07:50:05 2024 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=1515b614 Have _print_args() produce octal sequences for DEL With this change, octal sequences are rendered for all non-printable characters in the US-ASCII character set. 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 94d0f98..bbbd114 100644 --- a/functions.sh +++ b/functions.sh @@ -603,7 +603,6 @@ _is_visible() # of the ${*@Q} expansion in bash. The output shall be POSIX sh compatible as of # Issue 8. This should probably be made to exist as a standalone awk script. # -# _print_args() { awk -v q=\' -f - -- "$@" <<-'EOF' BEGIN { @@ -611,7 +610,7 @@ _print_args() { ARGC = 1 for (arg_idx = 1; arg_idx < argc; arg_idx++) { arg = ARGV[arg_idx] - if (arg !~ /[\001-\037]/) { + if (arg !~ /[\001-\037\177]/) { gsub(q, q "\\" q q, arg) word = q arg q } else { @@ -621,6 +620,7 @@ _print_args() { char = sprintf("%c", i) ord_by[char] = i } + ord_by["\177"] = 127 } word = "$'" for (i = 1; i <= length(arg); i++) {