From 0eb1bd2a431ffaf5f6fc5130158449adaa97346c Mon Sep 17 00:00:00 2001 From: Dawid Ferenczy Date: Wed, 23 Apr 2014 01:35:47 +0100 Subject: [PATCH] Added setting of the window title in Cygwin --- lib/termsupport.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index 9c0a430fb..103438fd9 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -2,13 +2,14 @@ #http://www.faqs.org/docs/Linux-mini/Xterm-Title.html#ss3.1 #Fully support screen, iterm, and probably most modern xterm and rxvt #Limited support for Apple Terminal (Terminal can't set window or tab separately) +#Should work with Cygwin in e.g. mintty, ConEmu or plain cmd.exe function title { if [[ "$DISABLE_AUTO_TITLE" == "true" ]] || [[ "$EMACS" == *term* ]]; then return fi if [[ "$TERM" == screen* ]]; then print -Pn "\ek$1:q\e\\" #set screen hardstatus, usually truncated at 20 chars - elif [[ "$TERM" == xterm* ]] || [[ $TERM == rxvt* ]] || [[ $TERM == ansi ]] || [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then + elif [[ "$TERM" == xterm* ]] || [[ $TERM == rxvt* ]] || [[ $TERM == ansi ]] || [[ $TERM == cygwin ]] || [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then print -Pn "\e]2;$2:q\a" #set window name print -Pn "\e]1;$1:q\a" #set icon (=tab) name (will override window name on broken terminal) fi