3 ms·
Specific question for anyone who's gone from bash to fish (and maybe back) -- Does the "only splitting on newlines" mess you up? I've just been in bash so long
by jrm4 5y ago
Specific question for anyone who's gone from bash to fish (and maybe back) -- Does the "only splitting on newlines" mess you up? I've just been in bash so long that I feel like this will get me?
- yourad_io 5y agoYou mean not splitting on spaces? No, never, ever bit me.
- faho 5y agoSpeaking with my fish developer hat on: The only common case where we find that splitting on spaces is actually needed is pkg-config and related tools, because that prints flags to be passed to the compiler, and it does it with spaces so it looks nicer and copy-pasteable: $ pkg-config --libs gio-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 (ideally, it would simply use newlines here, which bash et al would also split on) Typically, the easy workaround is `string split " "`: > somecommand (pkg-config --libs gio-2.0 | string split " ") Otherwise, this is quite rare in practice. Most unix tools already operate on a line-by-line basis, which allows them to be easily greppable.