From: Pat Thoyts Date: Tue, 4 Dec 2012 22:55:17 +0000 (+0000) Subject: shell prompt should not beep and only show MSYSTEM when non-standard. X-Git-Url: https://repo.or.cz/w/msysgit.git/commitdiff_plain/0433db08af3db8454dd90cb416060dae2fe64716 shell prompt should not beep and only show MSYSTEM when non-standard. The last change also printed the current working directory twice - once after the MSYSTEM and once after user@host. Reduced to a single instance. Acked-by: Johannes Schindelin Signed-off-by: Pat Thoyts --- diff --git a/etc/profile b/etc/profile index 59263889..66063102 100644 --- a/etc/profile +++ b/etc/profile @@ -154,19 +154,20 @@ esac # 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="$PS1"'\n' # new line PS1="$PS1"'\[\033[32m\]' # change color PS1="$PS1"'\u@\h ' # user@host PS1="$PS1"'\[\033[33m\]' # change color PS1="$PS1"'\w' # current working directory if test -z "$WINELOADERNOEXEC" then - PS1="$PS1"'$(__git_ps1)' # bash function + PS1="$PS1"'$(__git_ps1)' # bash function 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'