I wanted to do something like either of these statements, that is probably like bash, but received errors:
if ! prog ...
....
Error: fish: Unknown command '! prog ...'
if test ! prog ...
....
Error: test: Expected a combining operator like '-a' at index 2
You're looking for the not
keyword:
if not false
echo Foo
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With