files from dotfiles

This commit is contained in:
Robin Wenglewski 2011-09-08 10:48:39 +02:00
commit 7ccf4603a5
12 changed files with 244 additions and 0 deletions

10
functions.zsh Normal file
View file

@ -0,0 +1,10 @@
function title {
if [ "$TAB_TITLE" != "" ];then 1=$TAB_TITLE;fi
[ "$DISABLE_AUTO_TITLE" != "true" ] || return
if [[ "$TERM" == screen* ]]; then
print -Pn "\ek$1:q\e\\" #set screen hardstatus, usually truncated at 20 chars
elif [[ "$TERM" == xterm* ]] || [[ $TERM == rxvt* ]] || [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then
print -Pn "\e]2;$2:q\a" #set window name
print -Pn "\e]1;$1:q\a" #set icon (=tab) name (will override window name on broken terminal)
fi
}