Fish equivalent of bash $(command) notation Fish equivalent of bash $(command) notation shell shell

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"