# ANSI formatting function (\033[<code>m)
# 0: reset, 1: bold, 4: underline, 22: no bold, 24: no underline, 31: red, 33: yellow
ansi_pf() {
  [ $# -gt 0 ] || return
  IFS=";" printf "\033[%sm" "$*"
}
# if stdout is not a terminal ignore all formatting
[ -t 1 ] || ansi_pf() { :; }
