Theo Chatzimichos 9dd34f
HOSTUSAGE='{{ salt['pillar.get']('grains:hostusage', [])|join(', ') }}'
Theo Chatzimichos 9dd34f
# Other prompting for root
Theo Chatzimichos 9dd34f
if test "$UID" -eq 0  ; then
Theo Chatzimichos 9dd34f
    if test -n "$TERM" -a -t ; then
Theo Chatzimichos 9dd34f
        _bred="$(path tput bold 2> /dev/null; path tput setaf 1 2> /dev/null)"
Theo Chatzimichos 9dd34f
        _sgr0="$(path tput sgr0 2> /dev/null)"
Theo Chatzimichos 9dd34f
    fi
Theo Chatzimichos 9dd34f
    # Colored root prompt (see bugzilla #144620)
Theo Chatzimichos 9dd34f
    if test -n "$_bred" -a -n "$_sgr0" ; then
Theo Chatzimichos 9dd34f
        _u="\[$_bred\]\h ($HOSTUSAGE)"
Theo Chatzimichos 9dd34f
        _p=" #\[$_sgr0\]"
Theo Chatzimichos 9dd34f
    else
Theo Chatzimichos 9dd34f
        _u="\h ($HOSTUSAGE)"
Theo Chatzimichos 9dd34f
        _p=" #"
Theo Chatzimichos 9dd34f
    fi
Theo Chatzimichos 9dd34f
    unset _bred _sgr0
Theo Chatzimichos 9dd34f
else
Theo Chatzimichos 9dd34f
    _u="\u@\h"
Theo Chatzimichos 9dd34f
    _p=">"
Theo Chatzimichos 9dd34f
fi
Theo Chatzimichos 9dd34f
if test -z "$EMACS" -a -z "$MC_SID" -a -z "$restricted" -a \
Theo Chatzimichos 9dd34f
        -z "$STY" -a -n "$DISPLAY" -a ! -r $HOME/.bash.expert
Theo Chatzimichos 9dd34f
then
Theo Chatzimichos 9dd34f
    _t="\[\$(ppwd)\]"
Theo Chatzimichos 9dd34f
else
Theo Chatzimichos 9dd34f
    _t=""
Theo Chatzimichos 9dd34f
fi
Theo Chatzimichos 9dd34f
Theo Chatzimichos 9dd34f
Theo Chatzimichos 9dd34f
case "$(declare -p PS1 2> /dev/null)" in
Theo Chatzimichos 9dd34f
*-x*PS1=*)
Theo Chatzimichos 9dd34f
    ;;
Theo Chatzimichos 9dd34f
*)
Theo Chatzimichos 9dd34f
    # With full path on prompt
Theo Chatzimichos 9dd34f
    PS1="${_t}${_u}:\w${_p} "
Theo Chatzimichos 9dd34f
;;
Theo Chatzimichos 9dd34f
esac
Christian Boltz 6c1a97
Christian Boltz 6c1a97
alias highstate="salt-call state.highstate --state-output=changes --output-diff"
Christian Boltz 6c1a97
alias testhighstate="salt-call state.highstate --state-output=changes --output-diff test=True"