From 2387c63483773df2126bc099d2be289dfe3a6fdb Mon Sep 17 00:00:00 2001 From: jon Date: Sat, 15 Jun 2019 23:06:50 +0000 Subject: [PATCH] Fixed the tput issue when scp, check for tty before tput --- bash/.bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bash/.bashrc b/bash/.bashrc index aeaf121..9f8e60d 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -49,7 +49,7 @@ export HISTTIMEFORMAT="%F %T: " export HISTSIZE=1000 export HISTFILESIZE=2000 -if [ ! -z "$TERM" ]; then +if tty -s; then export PS1="\[$(tput bold)\]\[$(tput setaf 2)\][\u@\h \W]\\$ \[$(tput sgr0)\]" fi