mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
files from dotfiles
This commit is contained in:
parent
762b55bb2b
commit
7ccf4603a5
12 changed files with 244 additions and 0 deletions
10
functions.zsh
Normal file
10
functions.zsh
Normal 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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue