También puede usarbegin
yend
para condicionales:
For even more complex conditions, use begin and end to group parts of them.
Para un ejemplo más simple, puede echar un vistazo a esta respuesta de stackoverflow.
Para su código, solo tiene que reemplazar el (
con begin ;
y el )
con ; end
.
#!/usr/bin/fish
if begin ; false ; and true ; end ; or true
echo "true"
else
echo "false"
end
if false; and begin ; true ; or true ; end
echo "true"
else
echo "false"
end