GitVersion
Whatโ
Display the GitVersion version. We strongly recommend using GitVersion Portable for this.
caution
The GitVersion CLI can be a bit slow, causing the prompt to feel slow. This is why we cache the value for 30 minutes by default.
Sample Configurationโ
- json
- yaml
- toml
{
"type": "gitversion",
"style": "powerline",
"powerline_symbol": "๎ฐ",
"foreground": "#ffffff",
"background": "#3a579b",
"template": " ๏ {{ .MajorMinorPatch }} "
}
type: gitversion
style: powerline
powerline_symbol: ๎ฐ
foreground: "#ffffff"
background: "#3a579b"
template: " ๏ {{ .MajorMinorPatch }} "
type = "gitversion"
style = "powerline"
powerline_symbol = "๎ฐ"
foreground = "#ffffff"
background = "#3a579b"
template = " ๏ {{ .MajorMinorPatch }} "
Propertiesโ
Name | Type | Default | Description |
---|---|---|---|
cache_timeout | int | 30 | in minutes - How long to wait before fetching new information using the gitversion CLI. A value of 0 disables the cache. |
Template (info)โ
default template
{{ .MajorMinorPatch }}
Propertiesโ
You can leverage all variables from the GitVersion CLI. Have a look at their documentation for more information.