From 1d51c4f402c303830a5cf7ae91ae4042073b2b7e Mon Sep 17 00:00:00 2001 From: David Refoua Date: Tue, 15 Jul 2025 21:02:12 +0330 Subject: [PATCH] =?UTF-8?q?make=20bash=20prompt=20more=20consistent;=20*?= =?UTF-8?q?=20display=20=CE=BB=20in=20grey=20and=20bold=20*=20fix=20a=20bu?= =?UTF-8?q?g=20where=20an=20uneeded=20colon=20would=20be=20prepended=20to?= =?UTF-8?q?=20the=20tab=20title=20(when=20MSYSTEM=20is=20unset)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vendor/git-prompt.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/vendor/git-prompt.sh b/vendor/git-prompt.sh index 630073b..7e6c096 100644 --- a/vendor/git-prompt.sh +++ b/vendor/git-prompt.sh @@ -38,13 +38,13 @@ then . ~/.config/git/git-prompt.sh fi else - # Taken from https://github.com/git-for-windows/build-extra/blob/main/git-extra/git-prompt.sh - PS1='\[\033]0;$TITLEPREFIX:${PWD//[^[:ascii:]]/?}\007\]' # set window title + # Taken parts from https://github.com/git-for-windows/build-extra/blob/main/git-extra/git-prompt.sh + PS1='\[\033]0;${TITLEPREFIX:+$TITLEPREFIX:}${PWD//[^[:ascii:]]/?}\007\]' # set window title to TITLEPREFIX (if set) and current working directory # PS1="$PS1"'\n' # new line (disabled) - PS1="$PS1"'\[\033[32m\]' # change to green + PS1="$PS1"'\[\033[32m\]' # change to green and bold PS1="$PS1"'\u@\h ' # user@host PS1="$PS1${MSYSTEM:+\[\033[35m\]$MSYSTEM }" # show MSYSTEM in purple (if set) - PS1="$PS1"'\[\033[33m\]' # change to brownish yellow + PS1="$PS1"'\[\033[1;33m\]' # change to dark yellow in bold PS1="$PS1"'\w' # current working directory if test -z "$WINELOADERNOEXEC" then @@ -66,9 +66,11 @@ else fi fi fi - PS1="$PS1"'\[\033[0m\]' # change color + PS1="$PS1"'\[\033[0m\]' # reset color PS1="$PS1"'\n' # new line + PS1="$PS1"'\[\033[30;1m\]' # change color to grey in bold PS1="$PS1"'λ ' # prompt: Cmder uses λ + PS1="$PS1"'\[\033[0m\]' # reset color fi MSYS2_PS1="$PS1" # for detection by MSYS2 SDK's bash.basrc