xterms.zsh 352 Bytes
Newer Older
James Cox's avatar
James Cox committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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