I'm trying to test in a fish shell script for the existence of the
figlet binary. Since I use Linux and OS X I cannot rely on the file being in the same location and need to resolve it dynamically. I'm used to doing this with
$(which) in bash, which works.
With fish though this does not work properly. Why?
function print_hostname --description 'print hostname' if test -x (which figlet) hostname | figlet end end