[bug] nospace doesn't work for {{ .BranchStatus }}
#6865
Answered
by
JanDeDobbeleer
AtifChy
asked this question in
Troubleshoot
-
Beta Was this translation helpful? Give feedback.
Answered by
JanDeDobbeleer
Oct 6, 2025
Replies: 1 comment
-
|
@AtifChy nospace uses this function under the hood which then highly likely ruins that glyphs (for some reason, it's still correct). I also can't reproduce this on my machine, it correctly removes all spaces. The easiest fix for this is to use template:
"on <b><magenta>{{ .HEAD }} </>{{ if .Working }}<b><black>[{{ end }}\
<cyan>\
{{ if .BranchStatus }}{{ .BranchStatus | replace " " "" }}{{ end }}</>\
{{ if .Working.Changed }} <red>{{ .Working.String | replace " " "" }}</>{{ end }}\
{{ if .Staging.Changed }} <green>{{ .Staging.String | replace " " "" }}</>{{ end }}\
{{ if gt .StashCount 0 }} <yellow>${{ .StashCount }}</>{{ end }}\
{{ if .Working }}]</>{{ end }} " |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
AtifChy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@AtifChy nospace uses this function under the hood which then highly likely ruins that glyphs (for some reason, it's still correct). I also can't reproduce this on my machine, it correctly removes all spaces. The easiest fix for this is to use
replace.