浏览代码

add in xterms / title hacks

James Cox 14 年之前
父节点
当前提交
2b61a2aa3a
共有 1 个文件被更改,包括 16 次插入0 次删除
  1. 16 0
      xterms.zsh

+ 16 - 0
xterms.zsh

@@ -0,0 +1,16 @@
+# Specific to xterms, such as OS X terminal
+
+if [[ "${TERM}" == xterm* ]]; then
+  unset TMOUT
+
+  precmd () {
+    print -Pn  "\033]0;%n@%m %~\007"
+    #print -Pn "\033]0;%n@%m%#  %~ %l  %w :: %T\a" ## or use this
+  }
+
+  preexec () {
+    print -Pn "\033]0;%n@%m <$1> %~\007"
+    #print -Pn "\033]0;%n@%m%#  <$1>  %~ %l  %w :: %T\a" ## or use this
+  }
+
+fi