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:
parent
b5d33a6199
commit
b374a0ff03
2 changed files with 2 additions and 4 deletions
|
@ -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)\]\\$ \[\]"
|
||||
|
|
|
@ -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)\]\\$ \[\]"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue