changeset 182:e189dfb33bfa

zsh prompt: unset basically everything if in tramp
author Augie Fackler <durin42@gmail.com>
date Wed, 27 Jan 2010 22:52:18 -0600
parents 2d8105525973
children fe810e9731f0
files .shell.d/99.prompt.zsh
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/.shell.d/99.prompt.zsh
+++ b/.shell.d/99.prompt.zsh
@@ -59,6 +59,17 @@ if [ $FANCYTYPE = "NO" ] ; then
     RPS1=$'[%W %t]'
 fi
 
+if [[ $TERM == "dumb" ]]; then  # in emacs
+    # for tramp to not hang, need the following. cf:
+    # http://www.emacswiki.org/emacs/TrampMode
+    unsetopt zle
+    unsetopt prompt_cr
+    unsetopt prompt_subst
+    unfunction precmd
+    unfunction preexec
+fi
+
+
 #nonfancy no-frills prompt - disabled (same as the "non-fancy" one above)
 #prompt='[%m:%3~] %n%# '
 #RPS1=$'[%W %t]'