mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-14 09:50:08 +00:00
23 lines
No EOL
487 B
Bash
23 lines
No EOL
487 B
Bash
case "$TERM" in
|
|
xterm*|rxvt*)
|
|
preexec () {
|
|
print -Pn "\e]0;%n@%m: $1\a" # xterm
|
|
}
|
|
precmd () {
|
|
oh_my_zsh_theme_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 () {
|
|
oh_my_zsh_theme_precmd
|
|
echo -ne "\ekzsh\e\\"
|
|
print -Pn "\e]0;%n@%m: %~\a" # xterm
|
|
}
|
|
;;
|
|
esac |