1
0
mirror of https://github.com/meineerde/dotfiles.git synced 2025-10-17 19:41:01 +00:00

Fix spacing in PS1 for __prompt_vcs

This commit is contained in:
Holger Just 2025-01-21 14:50:16 +01:00
parent dc43aa9130
commit 60197d6484

View File

@ -282,7 +282,7 @@ ps1_host='\h'
__prompt_vcs() { __prompt_vcs() {
if [[ -z "$NOPROMPT" ]]; then if [[ -z "$NOPROMPT" ]]; then
git_ref() { git_ref() {
ref=$(echo -e "$(__git_ps1 "(%s)")") ref=$(echo -e "$(__git_ps1)")
if [ -z "$ref" ]; then return 1; fi if [ -z "$ref" ]; then return 1; fi
echo "$ref" echo "$ref"
} }
@ -290,7 +290,7 @@ __prompt_vcs() {
svn_ref() { svn_ref() {
[ -d ".svn" ] || return 1 [ -d ".svn" ] || return 1
ref=$(svn info | awk '/^URL/ { sub(".*/","",$0); r=$0 } /^Revision/ { sub("[^0-9]*","",$0); print $0 }') ref=$(svn info | awk '/^URL/ { sub(".*/","",$0); r=$0 } /^Revision/ { sub("[^0-9]*","",$0); print $0 }')
echo "[$ref]" echo " [$ref]"
} }
git_ref || svn_ref git_ref || svn_ref