A NOTE has been added to this issue. ====================================================================== https://austingroupbugs.net/view.php?id=1771 ====================================================================== Reported By: calestyo Assigned To: ====================================================================== Project: Issue 8 drafts Issue ID: 1771 Category: Shell and Utilities Type: Enhancement Request Severity: Editorial Priority: normal Status: New Name: Christoph Anton Mitterer Organization: User Reference: Section: Utilities / printf Page Number: 3269 Line Number: 111019 Final Accepted Text: ====================================================================== Date Submitted: 2023-08-07 19:22 UTC Last Modified: 2023-08-08 15:04 UTC ====================================================================== Summary: support or reserve %q as printf-utility format specifier ======================================================================
---------------------------------------------------------------------- (0006421) geoffclare (manager) - 2023-08-08 15:04 https://austingroupbugs.net/view.php?id=1771#c6421 ---------------------------------------------------------------------- > But POSIX already specifies %b for the printf utility I don't know the history behind the choice of %b. An uppercase letter would have been a better choice, ensuring no possibility of a future clash with the C standard. We should avoid making the same mistake (if that's what it was) again. > Also there seem to be other (lower case) conversion specifiers ..., e.g. glib/uClibc/musl have: 'm' True, but those are in the C library printf() function, and it is reasonable to expect the C committee to check for existing uses in printf() implementations before choosing a new lowercase letter to standardise. I doubt they would do the same for printf utility implementations. > %q is probably already used in many real world scripts The same is true for many cases in the past where POSIX standardised a different syntax from existing practice, e.g. sort -k 1,1 instead of sort +0 -1. Over time, application writers switch over to using the new syntax. > not sure how easy it would be to have the C folks exclude q (and perhaps also b) from their reservation? Too late now for C23, but might be worth suggesting some exclusions for their next revision. Issue History Date Modified Username Field Change ====================================================================== 2023-08-07 19:22 calestyo New Issue 2023-08-07 19:22 calestyo Name => Christoph Anton Mitterer 2023-08-07 19:22 calestyo Section => Utilities / printf 2023-08-07 19:22 calestyo Page Number => 3269 2023-08-07 19:22 calestyo Line Number => 111019 2023-08-07 19:36 chet_ramey Note Added: 0006416 2023-08-07 19:46 calestyo Note Added: 0006417 2023-08-07 23:39 salewski Issue Monitored: salewski 2023-08-08 08:46 geoffclare Note Added: 0006418 2023-08-08 14:28 calestyo Note Added: 0006420 2023-08-08 15:04 geoffclare Note Added: 0006421 ======================================================================
