summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2014-04-13 20:58:03 +0200
committerGravatar Tom Willemse2014-04-13 20:58:03 +0200
commit44bd2593c6557116c2ce0a1e2289003f68ccc5fa (patch)
tree05d6fcb7e20b6d088434823416fd9c08fa3079bf
parente1bce67894ce60f103467bf6d351c149ea09892b (diff)
downloadzsh-44bd2593c6557116c2ce0a1e2289003f68ccc5fa.tar.gz
zsh-44bd2593c6557116c2ce0a1e2289003f68ccc5fa.zip
Add precmd hook to integrate better with Emacs
-rw-r--r--.zshrc5
1 files changed, 5 insertions, 0 deletions
diff --git a/.zshrc b/.zshrc
index a3326e8..0566ac8 100644
--- a/.zshrc
+++ b/.zshrc
@@ -67,6 +67,11 @@ case $TERM in
precmd () { print -Pn "\e]0;%~\a" }
preexec () { print -Pn "\e]0;$1\a" }
;;
+ eterm-color*)
+ # Make {{ansi,multi}-,}term change Emacs' `default-directory'
+ # and keep track of the current user and host.
+ precmd () { print -P "\eAnSiTh %m\n\eAnSiTu %n\n\eAnSiTc %~" }
+ ;;
esac
export XDG_CACHE_HOME="$HOME/.cache"