Permalink
Browse files

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 <Johannes.Schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
  • Loading branch information...
1 parent 947ccf6 commit 0433db08af3db8454dd90cb416060dae2fe64716 @patthoyts patthoyts committed Dec 4, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 etc/profile
View
@@ -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<space>
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'

0 comments on commit 0433db0

Please sign in to comment.