zsh title: show host only on ssh
This commit is contained in:
parent
688a4b5eda
commit
8944348eee
@ -24,18 +24,38 @@
|
||||
|
||||
|
||||
case $TERM in
|
||||
*xterm*|rxvt|rxvt-unicode|rxvt-256color|rxvt-unicode-256color|(dt|k|E)term)
|
||||
precmd () { print -Pn "\e]0;[%n@%M][%~]%#\a" }
|
||||
preexec () { print -Pn "\e]0;[%n@%M][%~]%# ($1)\a" }
|
||||
;;
|
||||
screen)
|
||||
precmd () {
|
||||
print -Pn "\e]83;title \"$1\"\a"
|
||||
print -Pn "\e]0;$TERM - (%L) [%n@%M]%# [%~]\a"
|
||||
*xterm*|rxvt|rxvt-unicode|rxvt-256color|rxvt-unicode-256color|(dt|k|E)term)
|
||||
precmd () {
|
||||
if [[ -v SSH_CONNECTION ]]; then
|
||||
print -Pn "\e]0;[%n@%M][%~]#\a"
|
||||
else
|
||||
print -Pn "\e]0;[%~]#\a"
|
||||
fi
|
||||
}
|
||||
preexec () {
|
||||
print -Pn "\e]83;title \"$1\"\a"
|
||||
print -Pn "\e]0;$TERM - (%L) [%n@%M]%# [%~] ($1)\a"
|
||||
preexec () {
|
||||
if [[ -v SSH_CONNECTION ]]; then
|
||||
print -Pn "\e]0;[%n@%M][%~]# ($1)\a"
|
||||
else
|
||||
print -Pn "\e]0;[%~]# ($1)\a"
|
||||
fi
|
||||
}
|
||||
;;
|
||||
;;
|
||||
screen)
|
||||
precmd () {
|
||||
print -Pn "\e]83;title \"$1\"\a"
|
||||
if [[ -v SSH_CONNECTION ]]; then
|
||||
print -Pn "\e]0;$TERM - (%L) [%n@%M]# [%~]\a"
|
||||
else
|
||||
print -Pn "\e]0;$TERM - (%L)# [%~]\a"
|
||||
fi
|
||||
}
|
||||
preexec () {
|
||||
print -Pn "\e]83;title \"$1\"\a"
|
||||
if [[ -v SSH_CONNECTION ]]; then
|
||||
print -Pn "\e]0;$TERM - (%L) [%n@%M]# [%~] ($1)\a"
|
||||
else
|
||||
print -Pn "\e]0;$TERM - (%L) # [%~] ($1)\a"
|
||||
fi
|
||||
}
|
||||
;;
|
||||
esac
|
||||
|
Loading…
Reference in New Issue
Block a user