In bash I can say:
$ echo "a$(echo b)c"
abc
How do I do this in the fish shell?
echo a(echo b)c
If you have quotes, you must exit them:
echo "a"(echo b)"c"
If your subcommand may have newlines, as of fish 2.3, you have to save and restore $IFS:
set -l IFS
echo "a"(cat ~/file.txt)"c"
set -e IFS
Eventually string
will be able to handle this case.