SHORT_HOST=$(scutil --get ComputerName 2>/dev/null)
elif (( $+commands[hostnamectl] )); then
SHORT_HOST=$(hostnamectl --pretty 2>/dev/null)
+ [[ "$SHORT_HOST" =~ : ]] && unset SHORT_HOST
fi
[[ -z "$SHORT_HOST" ]] && SHORT_HOST=${HOST/.*/}
export SHORT_HOST