Skip to content

Commit 76c5b9e

Browse files
authored
resolve conflicts
1 parent aa156a2 commit 76c5b9e

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

vendor/git-prompt.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function getSimpleGitBranch() {
2020
then
2121
echo " (${headContent:16})"
2222
else
23-
echo " (HEAD detached at ${headContent:0:7})"
23+
echo " (HEAD detached at ${headContent:0:7})"
2424
fi
2525
}
2626

@@ -38,12 +38,12 @@ then
3838
. ~/.config/git/git-prompt.sh
3939
fi
4040
else
41-
PS1='\[\033]0;$TITLEPREFIX:$PWD\007\]' # set window title
42-
# PS1="$PS1"'\n' # new line
41+
# Taken from https://github.com/git-for-windows/build-extra/blob/main/git-extra/git-prompt.sh
42+
PS1='\[\033]0;$TITLEPREFIX:${PWD//[^[:ascii:]]/?}\007\]' # set window title
43+
# PS1="$PS1"'\n' # new line (disabled)
4344
PS1="$PS1"'\[\033[32m\]' # change to green
4445
PS1="$PS1"'\u@\h ' # user@host<space>
45-
# PS1="$PS1"'\[\033[35m\]' # change to purple
46-
# PS1="$PS1"'$MSYSTEM ' # show MSYSTEM
46+
PS1="$PS1${MSYSTEM:+\[\033[35m\]$MSYSTEM }" # show MSYSTEM in purple (if set)
4747
PS1="$PS1"'\[\033[33m\]' # change to brownish yellow
4848
PS1="$PS1"'\w' # current working directory
4949
if test -z "$WINELOADERNOEXEC"
@@ -68,18 +68,18 @@ else
6868
fi
6969
PS1="$PS1"'\[\033[0m\]' # change color
7070
PS1="$PS1"'\n' # new line
71-
PS1="$PS1"'λ ' # prompt: always λ
71+
PS1="$PS1"'λ ' # prompt: Cmder uses λ
7272
fi
7373

7474
MSYS2_PS1="$PS1" # for detection by MSYS2 SDK's bash.basrc
7575

7676
# Evaluate all user-specific Bash completion scripts (if any)
7777
if test -z "$WINELOADERNOEXEC"
7878
then
79-
for c in "$HOME"/bash_completion.d/*.bash
80-
do
81-
# Handle absence of any scripts (or the folder) gracefully
82-
test ! -f "$c" ||
83-
. "$c"
84-
done
79+
for c in "$HOME"/bash_completion.d/*.bash
80+
do
81+
# Handle absence of any scripts (or the folder) gracefully
82+
test ! -f "$c" ||
83+
. "$c"
84+
done
8585
fi

0 commit comments

Comments
 (0)