ansible/roles/base/files/setstgps1.sh
Todd Zullinger b374a0ff03 base: only set PS1 for prod/stage for interactive sessions
Setting PS1 for non-interactive shells doesn't make sense.  Using tput
in the PS1 causes spurious errors to be logged:

    tput: No value for $TERM and no -T specified
    tput: No value for $TERM and no -T specified

Resolves: #5234
2016-04-14 23:28:35 +00:00

3 lines
107 B
Bash

# Set PS1 based on env
#
[[ $- =~ i ]] && PS1="[\u@\h \W]\[$(tput setaf 6)\][STG]\[$(tput sgr0)\]\\$ \[\]"