diff options
author | 2024-08-03 01:52:02 +0100 | |
---|---|---|
committer | 2024-08-03 01:52:02 +0100 | |
commit | 23e3f65f2723f80c335d9309629439c27080b29f (patch) | |
tree | 19239a9c70bd17a35c168bd4d6849bd11c94569d | |
parent | Have chdir() enforce POSIX interpretation 1047 (diff) | |
download | gentoo-functions-23e3f65f2723f80c335d9309629439c27080b29f.tar.gz gentoo-functions-23e3f65f2723f80c335d9309629439c27080b29f.tar.bz2 gentoo-functions-23e3f65f2723f80c335d9309629439c27080b29f.zip |
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 <kfm@plushkava.net>
-rw-r--r-- | functions.sh | 4 |
1 files 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 { |