When I build anything in Sublime Text 3 (regardless of language), I get the following lines at the beginning of any console output:

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

I have no idea what shell settings ST3 is using or how to edit them. How do I get rid of this?

EDIT

Here are the contents of my ~/.bash_profile, which given the comments, probably need some editing:

# Prompt
NRM=`tput sgr0`
BLD=`tput bold`
ITL=`tput sitm`
UL=`tput smul`
RED=`tput setaf 1`
GRN=`tput setaf 2`
BLU=`tput setaf 4`

PS1='\n\r${BLD}\u${NRM}|${UL}\h${NRM} [${BLD}${BLU}\W${NRM}] \w \n>> '

# For Homebrew
export PATH=/usr/local/bin:$PATH
share|improve this question
1  
This is probably coming from your .bashrc. It needs to tet whether it's being used in an interactive shell, and skip things like tput when it's not. – Barmar Aug 26 '14 at 21:33
1  
Please edit your question with the contents of your ~/.bashrc and/or ~/.bash_profile – MattDMo Aug 26 '14 at 21:43
    
I've edited it. – Chris Redford Aug 26 '14 at 22:01
up vote 11 down vote accepted

Have to change .bash_profile to check for interactive shell before processing any tput calls:

if [[ $- == *i* ]]
then
    # Prompt
    NRM=`tput sgr0`
    BLD=`tput bold`
    ITL=`tput sitm`
    UL=`tput smul`
    RED=`tput setaf 1`
    GRN=`tput setaf 2`
    BLU=`tput setaf 4`
    PS1='\n\r${BLD}\u${NRM}|${UL}\h${NRM} [${BLD}${BLU}\W${NRM}] \w \n>> '
fi
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.