summaryrefslogtreecommitdiff
path: root/xterms.zsh
diff options
context:
space:
mode:
authorJames Cox <james@imaj.es>2009-09-22 23:27:28 +0100
committerJames Cox <james@imaj.es>2009-09-22 23:27:28 +0100
commit89d86d869c298642e809dfa7530b7ef2539cd07f (patch)
treed017304eeac5fa857f5e197b48a29c350436033f /xterms.zsh
parent7d511379c1eace3363433352a9e38831785d2e5e (diff)
downloadzsh-89d86d869c298642e809dfa7530b7ef2539cd07f.tar.gz
zsh-89d86d869c298642e809dfa7530b7ef2539cd07f.tar.bz2
zsh-89d86d869c298642e809dfa7530b7ef2539cd07f.zip
some todo notes, take @chris2's titlebar improvements and poke at completions
Diffstat (limited to 'xterms.zsh')
-rw-r--r--xterms.zsh37
1 files changed, 21 insertions, 16 deletions
diff --git a/xterms.zsh b/xterms.zsh
index 17c6a104b..fef978748 100644
--- a/xterms.zsh
+++ b/xterms.zsh
@@ -1,16 +1,21 @@
-# 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 \ No newline at end of file
+case "$TERM" in
+ xterm*|rxvt*)
+ preexec () {
+ print -Pn "\e]0;%n@%m: $1\a" # xterm
+ }
+ precmd () {
+ print -Pn "\e]0;%n@%m: %~\a" # xterm
+ }
+ ;;
+ screen*)
+ preexec () {
+ local CMD=${1[(wr)^(*=*|sudo|ssh|-*)]}
+ echo -ne "\ek$CMD\e\\"
+ print -Pn "\e]0;%n@%m: $1\a" # xterm
+ }
+ precmd () {
+ echo -ne "\ekzsh\e\\"
+ print -Pn "\e]0;%n@%m: %~\a" # xterm
+ }
+ ;;
+esac \ No newline at end of file