Merge pull request #4628 from moyamo/master
Default to using terminfo to set the terminal title
Diff
1diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh
2index 7cf15b0a0ee2d09775ee03aa7d419cd81961364e..871ab28dfa82f8c63d43538c64c18409b393c78b 100644
3--- a/lib/termsupport.zsh
4+++ b/lib/termsupport.zsh
5@@ -28,6 +28,14 @@ function title {
6 if [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then
7 print -Pn "\e]2;$2:q\a" # set window name
8 print -Pn "\e]1;$1:q\a" # set tab name
9+ else
10+ # Try to use terminfo to set the title
11+ # If the feature is available set title
12+ if [[ -n "$terminfo[fsl]" ]] && [[ -n "$terminfo[tsl]" ]]; then
13+ echoti tsl
14+ print -Pn "$1"
15+ echoti fsl
16+ fi
17 fi
18 ;;
19 esac