From 59c3438f0265c4a38135244ab8447b45d537fff3 Mon Sep 17 00:00:00 2001 Message-Id: <59c3438f0265c4a38135244ab8447b45d537fff3.1717777222.git.mdw@distorted.org.uk> From: Mark Wooding Date: Sat, 25 Jun 2011 14:40:05 +0100 Subject: [PATCH] dot/bashrc: Portability: use termcap if terminfo doesn't work. Organization: Straylight/Edgeware From: Mark Wooding Grumble grumble FreeBSD grumble. --- dot/bashrc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dot/bashrc b/dot/bashrc index c26fad3..f6b7a56 100644 --- a/dot/bashrc +++ b/dot/bashrc @@ -26,7 +26,12 @@ if [ -t 0 ]; then ## Fancy highlighting in some terminals. case "$TERM" in linux*|screen*|xterm*|vt100*|eterm*) - bold="\[$(tput bold)\]" unbold="\[$(tput sgr0)\]" nl="\[ \]" ;; + case "$(tput bold)" in + "") bold="\[$(tput md)\]" unbold="\[$(tput me)\]" ;; + *) bold="\[$(tput bold)\]" unbold="\[$(tput sgr0)\]" ;; + esac + nl="\[ \]" + ;; *) bold='' unbold='' nl='' ;; esac -- [mdw]