-
Notifications
You must be signed in to change notification settings - Fork 1.9k
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
string escape drops NUL and following text #4605
Comments
Yup. The issue is that we're still using c-style strings all over the place. This might take a while to solve. |
This is fixable in each individual case - if there's some particular case that's blocking you please let us know. |
TODO: This is a bit hacky (since it depends on getting the `storage` wcstring), and it currently only works for the "script" escaping style. Work towards fish-shell#4605.
I've now implemented this in a branch for the "script" escaping style (see the commit linked above). Note that it's a bit hacky because it needs to get the wcstring, so I just added a method to get a reference to the arg_iterator_t's I want to implement it for the other escape styles as well before I merge it. |
I have now converted all string subcommands except for Also, as it turns out |
TODO: This is a bit hacky (since it depends on getting the `storage` wcstring), and it currently only works for the "script" escaping style. Work towards fish-shell#4605.
TODO: This is a bit hacky (since it depends on getting the `storage` wcstring), and it currently only works for the "script" escaping style. Work towards fish-shell#4605.
TODO: This currently only works for the "script" escaping style. Work towards fish-shell#4605.
TODO: This currently only works for the "script" escaping style. Work towards #4605.
fish, version 2.7.0-513-g81dd4a45
Linux, Fedora 27, gnome-terminal (TERM=xterm-256cotor).
Confirmed without customization (
sh -c 'env HOME=$(mktemp -d) fish'
).Actual behavior:
string escape
doesn't handle NUL:and
string unescape
has similar problem:Expected behavior:
Generally, it should be possible to round-trip any binary data through
| string escape | string unescape |
.The text was updated successfully, but these errors were encountered: