You mind testing the bracket checker with this alias?

It behaves correctly for "/bracket_test 1", but displays nothing for "/bracket_test 0". This shows up if the last command of the line is commented and the if() condition is false. But if you comment test2 and not comment test3, it behaves as expected.

Code:
alias bracket_test {
  echo -a -----
  if ($1) { echo -a test1 | echo -a test2 | ; echo -a test3 }
  else echo -a test4
  echo -a test5
}