When using -bn option, only the first of the two examples below is correct. In the second case below, the binary operators are not formatted to be at the beginning of the line. The second example even gets re-formatted, so that the operators, once corrected manually, appear at the end of line again.
#!/bin/bash
# ok, pipes in front of line
if [[ -z "${foo}" ]] \
|| [[ -z "${bar}" ]] \
|| [[ -z "${baz}" ]]; then
echo "Hello world"
fi
# nok, pipes at the end of line
if [[ -z "${foo}" ||
-z "${bar}" ||
-z "${baz}" ]]; then
echo "Hello world"
fi
When using -bn option, only the first of the two examples below is correct. In the second case below, the binary operators are not formatted to be at the beginning of the line. The second example even gets re-formatted, so that the operators, once corrected manually, appear at the end of line again.