Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tput: No value for $TERM and no -T specified in Sublime Text 3

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
like image 656
Chris Redford Avatar asked Aug 26 '14 21:08

Chris Redford


1 Answers

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
like image 79
Chris Redford Avatar answered Nov 16 '22 03:11

Chris Redford