]> arthur.barton.de Git - ax-zsh.git/blobdiff - bin/axttyinfo
axttyinfo: Show COLORTERM when set
[ax-zsh.git] / bin / axttyinfo
index 57c76c0b010dfba611f8b8bafacb3fa86ce183e0..63ac50c99d9bc7f33f6cc8ce2107a3a5fcc1dcc2 100755 (executable)
@@ -20,11 +20,13 @@ while [[ $# -gt 0 ]]; do
        shift
 done
 
-print -Pn -- "$fg[white]$FX[bold]$(hostname)$FX[no-bold] "
+print -Pn -- "$fg[white]$FX[bold]$HOST$FX[no-bold] "
 print -Pn -- "$fg[yellow]$(tty)$FX[reset], "
 print -Pn -- "$fg[green]$FX[underline]${TERM:-?}$FX[reset] "
-print -Pn -- "(${COLUMNS:-?}x${LINES:-?}); "
-print -Pn -- "$fg[white]LANG=${LANG:-?}$FX[reset]"
+print -Pn -- "(${COLUMNS:-?}x${LINES:-?})"
+print -Pn -- "$FX[reset]"
+[[ -n "$LANG" ]] && print -Pn -- "; LANG=$LANG"
+[[ -n "$COLORTERM" ]] && print -Pn -- "; COLORTERM=$COLORTERM"
 echo
 
 [[ -z "$VERBOSE" ]] && return 0