# # Prompt config # setopt prompt_subst # enable colors autoload colors zsh/terminfo if [[ "$terminfo[colors]" -ge 8 ]]; then colors fi for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}' eval PR_LIGHT_$color='%{$fg[${(L)color}]%}' done PR_NO_COLOUR="%{$terminfo[sgr0]%}" export PR_OS_NAME=$(uname -s) export PR_OS_ARCH=$(uname -m) if [ -f /etc/debian_version ]; then # ugly way to detect Ubuntu chroots LSB_NAME=$(egrep 'DISTRIB_(ID|CODENAME)' /etc/lsb-release 2>/dev/null \ | tr '\n' '=' | cut -d'=' -f2,4 | tr '=' ' ') if [ "$PR_OS_NAME" = "Linux" ]; then PR_OS_NAME="Debian $(