A response to the question about printf supporting %n$ conversion
specifications I posted to savannah.
--- Begin Message ---
Follow-up Comment #5, sr #111166 (group bash):


[comment #4 comment #4:]
> [comment #3 comment #3:]
>> * explicit positional argument selection. Some versions of printf(3) allow
>> %4$s to select the 4th arg.
> 
> FWIW, I believe POSIX.1-2024 requires the printf utility to support this.
> 
> https://pubs.opengroup.org/onlinepubs/9799919799/utilities/printf.html

I took a look at this.

There are multiple incompatible implementations of this feature especially
when mixing numbered and unnumbered conversion specifications in the same
format string: FreeBSD/macOS vs. coreutils (git right now). zsh is like
coreutils, mksh is like FreeBSD. ksh93 is buggy. Other shells don't implement
it.

POSIX will wash its hands of some of these issues; the standard already
declares format strings that mix numbered and unnumbered conversion specifiers
as unspecified, for instance.

So it will likely a while before this shakes out and is available for common
use.


    _______________________________________________________

To reply to this notification, you have two options:
* In the Web UI at <https://savannah.gnu.org/support/?111166>.
* By email, ONLY IF you sign your email with a GPG key registered
  in your Savannah account AND you include the following line
  in the reply:

  {savane: user = 2590; tracker = support; item = 111166}

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature


--- End Message ---

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to