Fish equivalent of bash $(command) notation
In fish, $
is used only for variables. Correct notation equivalent to bash $(command)
is just (command)
in fish.
FYI: If you additionally need to use this inside a string:
echo "Found "(count $PATH)" paths in PATH env var"