On Fri, Nov 1, 2024, at 12:01 AM, Andrew via austin-group-l at The Open Group wrote: > What's the progress looking like for support of local, function scoped > variables in POSIX sh?
https://www.austingroupbugs.net/view.php?id=767#c5927: This was discussed during the 2022-08-08 conference call. Since there is clear disagreement about the scope of local variables, it is not clear that consensus can be reached. Therefore this bug is rejected. If a consensus is reached, please submit a new bug with proposed wording changes. > Are subshells an effective workaround meanwhile? Sure, assuming you don't care about or can work around losing the rest of the execution environment when the subshell exits. Taking advantage of the positional parameters can be another option in some cases. -- vq
