Suggest string split -n for separating on spaces.

At least on some versions/systems, pkg-config outputs a trailing
space. Since the usually-desired behavior isn't to have a blank argument,
recommend using `string split -n` instead of `string split`.

Fixes #6836.

[ci skip]
This commit is contained in:
jneem 2020-03-30 12:17:51 -05:00 committed by Johannes Altmanninger
parent 9459958c61
commit 3cf1de1b7f

View file

@ -374,7 +374,7 @@ Unlike other shells, fish does not split command substitutions on any whitespace
> printf '%s\n' (pkg-config --libs gio-2.0)
-lgio-2.0 -lgobject-2.0 -lglib-2.0
> printf '%s\n' (pkg-config --libs gio-2.0 | string split " ")
> printf '%s\n' (pkg-config --libs gio-2.0 | string split -n " ")
-lgio-2.0
-lgobject-2.0
-lglib-2.0