You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
version: 3.0.1
happens without third-party customizations: yes
regression from fish 2.7.1: does not apply
echo -n -e "a\x00b" | string split0 correctly splits between a and b, but exits with status code 1 despite having performed a split. This is contrary to the statement in the documentation that if a split was performed, string split[0] returns with status code 0.
Compare echo -n -e "a b" | string split " ", which correctly exits with 0.
The text was updated successfully, but these errors were encountered:
Splitting on newline, for all other string commands.
builtin_string.cpp has a method "nextstr()" that every string subcommand uses to get "the next argument", whether that's the next line from stdin, or the next argument from argv.
Only that won't work for split0, because that needs to get argv separated as it is, and stdin completely unsplit. And the only difference is the exit code.
Okay, as it turns out we never split on NUL elsewhere, so I just changed it from picking between splitting on newline or nul to splitting or not split at all, and then split0 actually does something.
version: 3.0.1
happens without third-party customizations: yes
regression from fish 2.7.1: does not apply
echo -n -e "a\x00b" | string split0
correctly splits between a and b, but exits with status code 1 despite having performed a split. This is contrary to the statement in the documentation that if a split was performed,string split[0]
returns with status code 0.Compare
echo -n -e "a b" | string split " "
, which correctly exits with 0.The text was updated successfully, but these errors were encountered: