Skip to content

Commit a2cfb4e

Browse files
authored
Avoid setting title over serial console (#388)
1 parent afa625b commit a2cfb4e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pure.zsh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,16 @@ prompt_pure_check_cmd_exec_time() {
5353
}
5454

5555
prompt_pure_set_title() {
56+
setopt localoptions noshwordsplit
57+
5658
# emacs terminal does not support settings the title
5759
(( ${+EMACS} )) && return
5860

61+
case $TTY in
62+
# Don't set title over serial console.
63+
/dev/ttyS[0-9]*) return;;
64+
esac
65+
5966
# tell the terminal we are setting the title
6067
print -n '\e]0;'
6168
# show hostname if connected through ssh

0 commit comments

Comments
 (0)