Skip to content

Instantly share code, notes, and snippets.

@csexton
Created June 14, 2010 19:26
Show Gist options
  • Save csexton/438157 to your computer and use it in GitHub Desktop.
Save csexton/438157 to your computer and use it in GitHub Desktop.
diff --git a/lib/functions.zsh b/lib/functions.zsh
index 5078ad6..314d4cc 100644
--- a/lib/functions.zsh
+++ b/lib/functions.zsh
@@ -1,24 +1,5 @@
-## fixme, i duplicated this in xterms - oops
-function title {
- if [[ $TERM == "screen" ]]; then
- # Use these two for GNU Screen:
- print -nR $'\033k'$1$'\033'\\\
-
- print -nR $'\033]0;'$2$'\a'
- elif [[ $TERM == "xterm" || $TERM == "rxvt" ]]; then
- # Use this one instead for XTerms:
- print -nR $'\033]0;'$*$'\a'
- fi
-}
-
-function precmd {
- title zsh "$PWD"
-}
-
function preexec {
emulate -L zsh
- local -a cmd; cmd=(${(z)1})
- title $cmd[1]:t "$cmd[2,-1]"
}
function zsh_stats() {
diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh
index fef9787..d96ea0b 100644
--- a/lib/termsupport.zsh
+++ b/lib/termsupport.zsh
@@ -7,15 +7,4 @@ case "$TERM" in
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
+esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment