fish-shell/fish-rust
Fabian Boehm 11c8d9684e
Make NULs work for builtins (#9859)
* Make NULs work for builtins

This switches from passing a c-string to output_stream_t::append to
passing a proper string.

That means a builtin that prints a NUL no longer crashes with "thread '' panicked
at 'String contained intermediate NUL character: ".

Instead, it will actually handle the NUL, even as an argument.

That means something like

`echo foo\x00bar` will now actually print a NUL instead of truncating
after the `foo` because we passed c-strings around everywhere.

The former is *necessary* for e.g. `string`, the latter is a change
that on the whole makes dealing with NULs easier, but it is a
behavioral change.

To restore the c-string behavior we would have to truncate arguments
at NUL.

See #9739.

* Use AsRef instead of trait bound
2023-06-22 20:50:22 +02:00
..
src Make NULs work for builtins (#9859) 2023-06-22 20:50:22 +02:00
widestring-suffix Initial Rust commit 2023-02-02 19:34:47 -07:00
build.rs Adopt the new output.rs 2023-06-17 12:14:42 -07:00
Cargo.lock Add rsconf build system and check for gettext symbols 2023-05-25 16:54:03 -05:00
Cargo.toml Add rsconf build system and check for gettext symbols 2023-05-25 16:54:03 -05:00