There are instances where a function needs to execute and return to the caller and this works for me.if tst; then    echo successelse    echo failurefifunction tst () {    return 0;}However, I can't seem to be able to do it using shortcut syntax. I've tried many combinations of the following statement including testing if [[ tst = true ]] or if it = 0 but I haven't been able to figure it out. [[ tst ]] && echo success || echo failureWhat is the proper way to test the function in the if condition using bash shortcut syntax?
How do I use a function return as a condition of an if else then shortcut?
bash;shell script
Assuming you want to use A && B || C, then simply call the function directly:tst && echo success || echo failureIf you want to use [[, you'd have to use the exit value:tstif [[ $? -eq 0 ]]then     ...