chronic

Display stdout and stderr of a command if and only if it fails. More information: https://joeyh.name/code/moreutils/.

chronic command options ...

chronic -e command options ...

chronic -v command options ...