fee61a7c4731a1835dfc13f4e6ddc8482d5f1d01

Author
Manuel Faux <manuel@conf.at>
Committer
GitHub <noreply@github.com>
Date

Message

fix(screen): Prevent title being overwritten (#4633)

lib/termsupport.zsh creates titles for screen which take precedence over
titles set by the screen plugin. Unsetting the title() function within
the screen plugin prevent this "race-condition".

Diff

 1diff --git a/plugins/screen/screen.plugin.zsh b/plugins/screen/screen.plugin.zsh
 2index 26531c40b800ee79f26391f018dd494b9199ecf4..375d8750a22007c51ad2e4d472d5909e348c89a4 100644
 3--- a/plugins/screen/screen.plugin.zsh
 4+++ b/plugins/screen/screen.plugin.zsh
 5@@ -1,6 +1,10 @@
 6 # if using GNU screen, let the zsh tell screen what the title and hardstatus
 7 # of the tab window should be.
 8 if [[ "$TERM" == screen* ]]; then
 9+  # Unset title() function defined in lib/termsupport.zsh to prevent
10+  # overwriting our screen titles
11+  title(){}
12+
13   if [[ $_GET_PATH == '' ]]; then
14     _GET_PATH='echo $PWD | sed "s/^\/Users\//~/;s/^\/home\//~/;s/^~$USERNAME/~/"'
15   fi