Skip to content

restore window title #111

Merged
merged 3 commits into from Jun 2, 2013

2 participants

@rctay
rctay commented Apr 9, 2013

The msys shell used to be able to display the window title as "MINGW32:", which was very useful when multiple shells were open. This behaviour was lost due a series of commits, namely

This pull request/branch was constructed by first basing on 4e4e3f3 and fixing the annotations. 759a59f and 0433db0 were then reverted via merges. Merges were used to ensure this information was captured in the git history, as well as ensure conflict-free merging into upstream.

rctay added some commits Apr 9, 2013
@rctay rctay PS1: fix annotations
In 4e4e3f3, the 0; and bell etc. were incorrectly interpreted as having
to do with colors. In fact, it is responsible for setting the window
title. [1]

[1] http://www.faqs.org/docs/Linux-mini/Xterm-Title.html#ss3.1

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
06a3e9c
@rctay rctay Merge commit '759a59f67bfcb7cf1fb11f289d04398eb78de908' into ps1-title
In effect, this reverts the change of the escape sequence from

  \033]0;

to

  \033[0m

due to an incorrect understanding of their purposes in 4e4e3f3.

Conflicts:
	etc/profile
dac8d21
@rctay rctay Merge commit '0433db08af3db8454dd90cb416060dae2fe64716' into ps1-title
In effect, this reverts 0433db0, since
its motivation (beep, double-display of pwd) is no longer present.

Conflicts:
	etc/profile
c40377c
@rctay
rctay commented on dac8d21 Apr 10, 2013
$ git diff dac8d21^2 dac8d21
diff --git a/etc/profile b/etc/profile
index c406ad2..b5858be 100644
--- a/etc/profile
+++ b/etc/profile
@@ -154,9 +154,7 @@ esac
 . /git/contrib/completion/git-completion.bash

 # non-printable characters must be enclosed inside \[ and \]
-PS1='\[\033[0m\]'              # VT100 compat: reset all colors
-PS1="$PS1"'$MSYSTEM:\w'        # e.g. MINGW32:/path/to/cwd
-PS1="$PS1"'\[\007\]'           # Ascii character BEL
+PS1='\[\033]0;$MSYSTEM:\w\007\]' # set window title
 PS1="$PS1"'\n'                 # new line
 PS1="$PS1"'\[\033[32m\]'       # change color
 PS1="$PS1"'\u@\h '             # user@host<space>
@rctay
rctay commented on c40377c Apr 10, 2013
$ git diff c40377c^2 c40377c
diff --git a/etc/profile b/etc/profile
index 6606310..6c68d7d 100644
--- a/etc/profile
+++ b/etc/profile
@@ -153,7 +153,8 @@ esac
 [ -r /git/contrib/completion/git-prompt.sh ] && . /git/contrib/completion/git-prompt.sh

 # non-printable characters must be enclosed inside \[ and \]
-PS1='\[\033[0m\]'              # VT100 compat: reset all colors
+PS1='\[\033]0;$MSYSTEM:\w\007\]' # set window title
+PS1="$PS1"'\n'                 # new line
 PS1="$PS1"'\[\033[32m\]'       # change color
 PS1="$PS1"'\u@\h '             # user@host<space>
 PS1="$PS1"'\[\033[33m\]'       # change color
@@ -164,10 +165,6 @@ then
 fi
 PS1="$PS1"'\[\033[0m\]'        # change color
 PS1="$PS1"'\n'                 # new line
-                               # show MSYSTEM if non-standard
-if [ "$MSYSTEM" != "MINGW32" ]; then
-    PS1="$PS1"'\[\033[35m\]($MSYSTEM)\[\033[0m\] '
-fi
 PS1="$PS1"'$ '                 # prompt: always $

 # set default options for 'less'
@patthoyts patthoyts merged commit c40377c into msysgit:master Jun 2, 2013
@wking wking added a commit to swcarpentry/bc that referenced this pull request May 15, 2014
@wking wking Merge remote-tracking branch 'gdevenyi/improvesetup'
Merge Gabriel's pull request which among other things un-pins the
msysGit version [1].  We've had some problems with previous versions:

* Something about email prompting with 1.8.4 [2].
* "fatal: could not read..." errors on https:// clones with
  1.8.5.2-preview20131230 [3,4].

but Gabriel tested v1.9.0 and didn't see an email prompt [5] and Git
v1.9.0 fixed the HTTPS issue [6]:

> Fixed regression with interactive password prompt for remotes using
> the HTTPS protocol (issue msysgit/msysgit#111).

So until we find more problems, we're back to floating msysGit :).

[1]: #485
[2]: https://github.com/swcarpentry/bc/wiki/Configuration-Problems-and-Solutions#bash
[3]: fae9c74
[4]: #234 (comment)
[5]: #485 (comment)
[6]: https://github.com/msysgit/msysgit/releases/tag/Git-1.9.0-preview20140217

* gdevenyi/improvesetup:
  Update R install details
  Point msysgit link to main page rather than hardcoding download
  Removed editorializing of editor
  Add details of nano for windows users
  Update to latest msysgit
  Add yum as a linux package manager
5ab0acc
@wking wking added a commit to wking/swc-boot-camps-v2 that referenced this pull request Sep 8, 2014
@wking wking Merge remote-tracking branch 'gdevenyi/improvesetup'
Merge Gabriel's pull request which among other things un-pins the
msysGit version [1].  We've had some problems with previous versions:

* Something about email prompting with 1.8.4 [2].
* "fatal: could not read..." errors on https:// clones with
  1.8.5.2-preview20131230 [3,4].

but Gabriel tested v1.9.0 and didn't see an email prompt [5] and Git
v1.9.0 fixed the HTTPS issue [6]:

> Fixed regression with interactive password prompt for remotes using
> the HTTPS protocol (issue msysgit/msysgit#111).

So until we find more problems, we're back to floating msysGit :).

[1]: swcarpentry#485
[2]: https://github.com/swcarpentry/bc/wiki/Configuration-Problems-and-Solutions#bash
[3]: swcarpentry@fae9c74
[4]: swcarpentry#234 (comment)
[5]: swcarpentry#485 (comment)
[6]: https://github.com/msysgit/msysgit/releases/tag/Git-1.9.0-preview20140217

* gdevenyi/improvesetup:
  Update R install details
  Point msysgit link to main page rather than hardcoding download
  Removed editorializing of editor
  Add details of nano for windows users
  Update to latest msysgit
  Add yum as a linux package manager
6cd7e90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.