Multiple segments with the same fetching information property #5499
Answered
by
JanDeDobbeleer
accedo-robcc
asked this question in
Troubleshoot
-
If I were to have multiple segments with the same fetching information (eg. {
"type": "git",
"style": "plain",
"foreground": "p:blue",
"properties": {
"fetch_status": true
},
"template": "{{ if gt .Ahead 0 }} \u2191{{.Ahead}}{{end}}{{ if gt .Behind 0 }} \u2193{{.Behind}}{{end}} "
},
{
"type": "git",
"style": "plain",
"foreground": "p:blue",
"properties": {
"fetch_status": true
},
"template": "{{ if gt .Working.Added 0 }}+{{ .Working.Added }} {{ end }}{{ if gt .Working.Modified 0 }}<p:git-modified>~{{ .Working.Modified }}</> {{ end }}{{ if gt .Working.Deleted 0 }}-{{ .Working.Deleted }} {{ end }}{{ if gt .Working.Untracked 0 }}?{{ .Working.Untracked }}{{ end }} "
} |
Beta Was this translation helpful? Give feedback.
Answered by
JanDeDobbeleer
Aug 22, 2024
Replies: 1 comment 3 replies
-
The performance impact of a |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@accedo-robcc it's fetched twice. Unless if you use cross segment properties in a text segment for example.