chiark / gitweb /
dot/bashrc, dot/zshrc: Do highlighting when `TERM' is `putty...'.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 24 Jan 2019 15:14:45 +0000 (15:14 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 24 Jan 2019 15:14:45 +0000 (15:14 +0000)
This is the `proper' terminal-type family for `pterm', even though it
has some unfortunate behaviour which means that I still prefer
`xterm...' in general.

dot/bashrc
dot/zshrc

index 5f9742a0eb1ea76b407ef24d38da5618f054ad27..990d6453e5c99ead619363289107592e96db76e8 100644 (file)
@@ -27,7 +27,7 @@ __mdw_source_if_exists /etc/bash_completion "$HOME/.bash_completion"
 
 __mdw_set_prompt_hacks () {
   case "$TERM" in
-    linux*|screen*|xterm*|vt100*|eterm*)
+    linux*|screen*|xterm*|putty*|vt100*|eterm*)
       case "$(tput bold)" in
        "") bold="\[$(tput md)\]" unbold="\[$(tput me)\]" ;;
        *) bold="\[$(tput bold)\]" unbold="\[$(tput sgr0)\]" ;;
@@ -35,7 +35,8 @@ __mdw_set_prompt_hacks () {
       gitcolour="\[$(tput setaf 6)\]"
       rccolour="\[$(tput setaf 1)\]"
       uncolour="\[$(tput op)\]"
-      nl="\[\r\]"
+      nl="\[
+\]"
       ;;
   esac
   host='\h' dir=' \w'
index 9cc436baeb8ad7bcbf19cba81a5f15f7dd2fbb65..8cedc6783ce1f05dda3a795bed871afb3391e026 100644 (file)
--- a/dot/zshrc
+++ b/dot/zshrc
@@ -12,7 +12,7 @@ case ${INSIDE_EMACS+t},$TERM in t,dumb) unsetopt zle ;; esac
 
 __mdw_set_prompt_hacks () {
   case $TERM in
-    linux*|screen*|xterm*|vt100*|eterm*)
+    linux*|screen*|xterm*|putty*|vt100*|eterm*)
       bold=%B unbold=%b
       gitcolour=%F{cyan} rccolour=%F{red} uncolour=%f
       ;;