Hi. It would be nice if dash could support $'…' style strings as bash does. This also seem to be sooner or later going to be part of POSIX: https://austingroupbugs.net/view.php?id=249#c599 Cheers, Chris.
Control: severity -1 normal Control: found -1 0.5.12-2 Control: found -1 0.5.12-9 It is mandatory dash supports $'-escapes, because they are part of Issue 8 (POSIX.1-2024). Consult your PDFs' XCU, 2 Shell Command Language, 2.2 Quoting, 2.2.4 Dollar-Single-Quotes. Currently dash yields $ printf '%s\n' $'\123' $\123 But it must do $ printf '%s\n' $'\123' S Best,
I'd really appreciate this to be supported in dash. It is a nice and portable way of printing terminal control sequences, since neither printf nor echo are required to support the '\e' escape, but Dollar-Single-Quotes strings are.
I was bit by dash not having support for this construct which is specified in POSIX: my makefile didn't work because dash is the default /bin/sh and this is used by GNU Make. I think the referenced commit fixed this upstream last year but haven't had the chance to test yet.
I have confirmed that this is fixed in dash 0.5.13.1 by https://git.kernel.org/pub/scm/utils/dash/dash.git/commit/?id=776424a8f9158bfe9f53aa55f931af9f73437caf наб wrote: Care should be taken so if this fix makes it into Forky, and any maintainer scripts use this new syntax, that they won't break with a not-yet-upgraded dash from Trixie. Perhaps when the new version of dash is uploaded, it might be smart to have Lintian warning about such assuming Debian Policy still mandates POSIX.1-2017 conformance here.