зеркало из https://github.com/github/msysgit.git
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>
This commit is contained in:
Родитель
947ccf6973
Коммит
0433db08af
|
@ -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'
|
||||
|
|
Загрузка…
Ссылка в новой задаче