read should have a flag that makes it split on NUL instead of on $IFS. There are a number of commands that use NUL as a record separator, and it would be great if fish could loop over those. Since fish does not support using NUL on the command-line, there is no way to set $IFS to contain NUL, and therefore no way to split on NUL at the moment. Ideally, fish would learn to accept NUL everywhere, but that seems extremely unlikely to happen given the frequency with which fish has to use wchar_t* instead of wcstring.
Similarly, it would be great if command substitution could learn to optionally split on NUL instead of newline, but I can't think of any good syntax for that. However, if read can split on NUL, then the problem can be worked around by piping the output into read instead.
readshould have a flag that makes it split on NUL instead of on$IFS. There are a number of commands that use NUL as a record separator, and it would be great if fish could loop over those. Since fish does not support using NUL on the command-line, there is no way to set$IFSto contain NUL, and therefore no way to split on NUL at the moment. Ideally, fish would learn to accept NUL everywhere, but that seems extremely unlikely to happen given the frequency with which fish has to usewchar_t*instead ofwcstring.Similarly, it would be great if command substitution could learn to optionally split on NUL instead of newline, but I can't think of any good syntax for that. However, if
readcan split on NUL, then the problem can be worked around by piping the output intoreadinstead.