diff zsh @ 68:d6e52e074962

Allow change title in zsh
author Edho Prima Arief <me@myconan.net>
date Sat, 21 May 2011 23:55:33 -0400
parents 21e3f6ea5d59
children c8c3e4bc4850
line wrap: on
line diff
--- a/zsh	Sun May 22 00:45:30 2011 +0700
+++ b/zsh	Sat May 21 23:55:33 2011 -0400
@@ -1,5 +1,10 @@
 #!/usr/bin/env zsh
 [ -f "${HOME}/.ecos_zsh.before" ] && . "${HOME}/.ecos_zsh.before"
+case $TERM in
+  xterm*|screen*)
+    precmd () {print -Pn "\e]0;%n@%m: %~\a"}
+  ;;
+esac
 PS1='[%n@%m %~]%% '
 HISTFILE=~/.histfile
 HISTSIZE=10000