mirror of
https://github.com/cmderdev/cmder.git
synced 2025-03-13 06:04:36 +08:00
remove additional spaces
This commit is contained in:
parent
7f682653e4
commit
9aa26c46d0
14
vendor/git-prompt.sh
vendored
14
vendor/git-prompt.sh
vendored
@ -1,5 +1,5 @@
|
|||||||
function getGitStatusSetting() {
|
function getGitStatusSetting() {
|
||||||
gitStatusSetting=$(git --no-pager config -l 2>/dev/null)
|
gitStatusSetting=$(git --no-pager config -l 2>/dev/null)
|
||||||
|
|
||||||
if [[ -n ${gitStatusSetting} ]] && [[ ${gitStatusSetting} =~ cmder.status=false ]] || [[ ${gitStatusSetting} =~ cmder.shstatus=false ]]
|
if [[ -n ${gitStatusSetting} ]] && [[ ${gitStatusSetting} =~ cmder.status=false ]] || [[ ${gitStatusSetting} =~ cmder.shstatus=false ]]
|
||||||
then
|
then
|
||||||
@ -12,16 +12,16 @@ function getGitStatusSetting() {
|
|||||||
function getSimpleGitBranch() {
|
function getSimpleGitBranch() {
|
||||||
gitDir=$(git rev-parse --git-dir 2>/dev/null)
|
gitDir=$(git rev-parse --git-dir 2>/dev/null)
|
||||||
if [ -z "$gitDir" ]; then
|
if [ -z "$gitDir" ]; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
headContent=$(< "$gitDir/HEAD")
|
headContent=$(< "$gitDir/HEAD")
|
||||||
if [[ "$headContent" == "ref: refs/heads/"* ]]
|
if [[ "$headContent" == "ref: refs/heads/"* ]]
|
||||||
then
|
then
|
||||||
echo " (${headContent:16})"
|
echo " (${headContent:16})"
|
||||||
else
|
else
|
||||||
echo " (HEAD detached at ${headContent:0:7})"
|
echo " (HEAD detached at ${headContent:0:7})"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if test -f /etc/profile.d/git-sdk.sh
|
if test -f /etc/profile.d/git-sdk.sh
|
||||||
@ -68,7 +68,7 @@ else
|
|||||||
fi
|
fi
|
||||||
PS1="$PS1"'\[\033[0m\]' # change color
|
PS1="$PS1"'\[\033[0m\]' # change color
|
||||||
PS1="$PS1"'\n' # new line
|
PS1="$PS1"'\n' # new line
|
||||||
PS1="$PS1"'λ ' # prompt: always λ
|
PS1="$PS1"'λ ' # prompt: always λ
|
||||||
fi
|
fi
|
||||||
|
|
||||||
MSYS2_PS1="$PS1" # for detection by MSYS2 SDK's bash.basrc
|
MSYS2_PS1="$PS1" # for detection by MSYS2 SDK's bash.basrc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user