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
This commit is contained in:
Todd Zullinger 2016-04-14 13:38:32 -04:00 committed by Kevin Fenzi
parent b5d33a6199
commit b374a0ff03
2 changed files with 2 additions and 4 deletions

View file

@ -1,4 +1,3 @@
# Set PS1 based on env
#
PS1="[\u@\h \W]\[$(tput setaf 3)\][PROD]\[$(tput sgr0)\]\\$ \[\]"
[[ $- =~ i ]] && PS1="[\u@\h \W]\[$(tput setaf 3)\][PROD]\[$(tput sgr0)\]\\$ \[\]"

View file

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