dot-emacs: Finally fix fontification in cpp-messages-mode.
[profile] / bashrc
diff --git a/bashrc b/bashrc
index 5f9e13e..6fb97f4 100644 (file)
--- a/bashrc
+++ b/bashrc
@@ -30,11 +30,20 @@ if [ -t 0 ]; then
 
     if (( EUID == 0 )); then
       left="«" right="»"
-    elif [ "$__mdw_tty" = "`tty`" ]; then
-      left="<" right=">"
     else
-      left="[" right="]"
-      export __mdw_tty="`tty`"
+      case $USER in
+        mdw|mwooding)
+         u="" left="[" right="]"
+         ;;
+       *)
+         u="\\u@" left="{" right="}"
+         ;;
+      esac
+      if [ "$__mdw_tty" = "`tty`" ]; then
+       left="<" right=">"
+      else
+        export __mdw_tty="`tty`"
+      fi
     fi
 
     if [ -z "$SSH_CLIENT" ] &&
@@ -43,7 +52,7 @@ if [ -t 0 ]; then
       sec_l='(' sec_r=')'
     fi
 
-    PS1="$nl$bold$left$sec_l\\h$sec_r \\w$right$unbold"
+    PS1="$nl$bold$left$sec_l$u\\h$sec_r \\w$right$unbold"
     PS2="$PS1 $bold>$unbold "
   fi
 
@@ -105,53 +114,20 @@ ls () {
   fi
 }
 
-# --- Setting xterm titles ---
-#
-# This doesn't work so well any more. :-(
-
-# if [ -e /usr/lib/bash/xtitle.so ]; then
-#   enable -f /usr/lib/bash/xtitle.so xtitle
-# elif [ -e /usr/local/lib/xtitle.so ]; then
-#   enable -f /usr/local/lib/xtitle.so xtitle
-# elif [ -e $HOME/lib/bash/xtitle.so ]; then
-#   enable -f $HOME/lib/bash/xtitle.so xtitle
-# else
-#   xtitle () { return 1; }
-# fi
-xtitle () { return 1; }
-
-entitle () {
-  local t="`xtitle -q`" st
-  xtitle "$t $1"
-  shift
-  "$@"; st=$?
-  xtitle "$t"
-  return $st
-}
-
 # --- Set up some simple aliases ---
 
 alias cx='chmod a+x'
 alias which="command -v"
 alias ssync="rsync -e ssh"
-alias rootly="entitle root become -g0 root"
+alias rootly=$__MDW_ROOTLY
 alias r=rootly
-alias eh="entitle 'Egham Hills 90210' tf eh"
-alias news="entitle Usenet slrn"
-alias splitvt='splitvt -t "`xtitle -q || echo xterm` splitvt"'
+alias re="rootly $EDITOR"
 alias pstree="pstree -Ghl"
 alias cdtmp='cd ${TMPDIR-/tmp}'
 alias pushtmp='pushd ${TMPDIR-/tmp}'
-alias e="sensible-editor"
+alias e="$EDITOR"
 alias svn="svnwrap svn"
-
-@ () {
-  local t="`xtitle -q`" host="$1"
-  shift
-  xtitle "$t [$host]"
-  ssh "$host" "$@"
-  xtitle "$t"
-}
+alias @="ssh"
 
 # --- Make `xt' start an xterm, maybe logging into a remote host ---