Skip to content

Commit

Permalink
Avoid setting title over serial console (#388)
Browse files Browse the repository at this point in the history
  • Loading branch information
mafredri authored Apr 22, 2018
1 parent afa625b commit a2cfb4e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pure.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,16 @@ prompt_pure_check_cmd_exec_time() {
}

prompt_pure_set_title() {
setopt localoptions noshwordsplit

# emacs terminal does not support settings the title
(( ${+EMACS} )) && return

case $TTY in
# Don't set title over serial console.
/dev/ttyS[0-9]*) return;;
esac

# tell the terminal we are setting the title
print -n '\e]0;'
# show hostname if connected through ssh
Expand Down

0 comments on commit a2cfb4e

Please sign in to comment.