coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

fix(printf): redesign %q implementation for bash compatibility

Open naoNao89 opened this issue 2 weeks ago • 0 comments

Fixes #9638

Redesigned printf %q implementation to match bash behavior. Previous approach incorrectly used SHELL_ESCAPE (designed for ls). Created dedicated PrintfQuoter with proper algorithm: empty→'', simple→unchanged, metacharacters→backslash, control→$'...'. Includes 18 tests and related apostrophe bug fix.

naoNao89 avatar Dec 12 '25 01:12 naoNao89