Delimited command substitution in Fish

Viewed 417

Is it possible in Fish to perform command substitution in a way where I define the command to be treated as a single argument for commands like echo? In Bash it would be equivalent to e.g.:

$ echo "$(cat file.txt)"
lorem
ipsum

The approach suggested by Fish doesn't work for multi-line (or spaced) output:

$ echo (cat file.txt)
lorem ipsum

And if I add quotes, it doesn't perform the command substitution at all:

$ echo "(cat file.txt)"
(cat file.txt)
1 Answers
Related