dot/ercrc.el: Do something more useful for long input lines.
[profile] / dot / bashrc
index c26fad3..37ff27c 100644 (file)
@@ -1,4 +1,4 @@
-### -*-sh-*-
+### -*-bash-*-
 ###
 ### Bash session things
 
@@ -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="\[\r\]" ;;
+      case "$(tput bold)" in
+       "") bold="\[$(tput md)\]" unbold="\[$(tput me)\]" ;;
+       *) bold="\[$(tput bold)\]" unbold="\[$(tput sgr0)\]" ;;
+      esac
+      nl="\[\r\]"
+      ;;
     *)
       bold='' unbold='' nl='' ;;
   esac