This repository has been archived by the owner on Apr 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Escape sequences in command parameters are incorrectly consumed by the shell #53
Comments
Just to avoid confusion since the correct output wasn't mentioned, |
AtkinsSJ
added a commit
to AtkinsSJ/phoenix
that referenced
this issue
Mar 11, 2024
This is by no means complete, but covers most of the POSIX spec: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/printf.html - Escape sequences (currently the shell handles these wrong, see HeyPuter#53 ) - %d %i %o %u %x and %X integer formatters - %e %E %f %F %g and %G float formatters - %c and %S string formatters Still to do: - %a and %A hexadecimal float formatters - %b for formatting a string including escape sequences - Anything beyond the spec that's common and users might expect.
AtkinsSJ
added a commit
to AtkinsSJ/phoenix
that referenced
this issue
Mar 11, 2024
This is by no means complete, but covers most of the POSIX spec: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/printf.html - Escape sequences (currently the shell handles these wrong, see HeyPuter#53 ) - %d %i %o %u %x and %X integer formatters - %e %E %f %F %g and %G float formatters - %c and %S string formatters Still to do: - %a and %A hexadecimal float formatters - %b for formatting a string including escape sequences - Anything beyond the spec that's common and users might expect.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
For example,
echo "\n\n\n\n\n"
emits only a single newline, becauseecho
always emits a newline after its output. When that string reachesecho
as a positional argument, the newline escapes are gone.As another example,
echo "hello\nfriends\n"
currently outputs this from aconsole.log()
call:As you can see,
args
is 'hellofriends' without the escapes.The text was updated successfully, but these errors were encountered: