From 4e4e3f3fefab0ead3aa0b4822675355d40303b10 Mon Sep 17 00:00:00 2001 From: Benoit Mortgat Date: Mon, 18 Jun 2012 14:17:58 +0200 Subject: [PATCH] Bash PS1: Split up PS1 into small components Signed-off-by: Benoit Mortgat --- etc/profile | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/etc/profile b/etc/profile index 6a1bc8dd..3acf9660 100644 --- a/etc/profile +++ b/etc/profile @@ -153,14 +153,21 @@ esac . /git/contrib/completion/git-completion.bash -PS1='\[\033]0;$MSYSTEM:\w\007 -\033[32m\]\u@\h \[\033[33m\w' +PS1='\[\033]0;' # 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)' + PS1="$PS1"'$(__git_ps1)' # bash function fi -PS1="$PS1"'\033[0m\] -$ ' +PS1="$PS1"'\033[0m\]' # change color +PS1="$PS1"'\n' # new line +PS1="$PS1"'$ ' # prompt: always $ # set default options for 'less' export LESS=-FRSX -- 2.11.4.GIT