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:
parent
dc43aa9130
commit
60197d6484
4
.bashrc
4
.bashrc
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user