oh-my-posh/docs/docs/segment-nbgv.mdx
2021-11-20 10:14:26 +00:00

48 lines
1.3 KiB
Plaintext

---
id: nbgv
title: Nerdbank.GitVersioning
sidebar_label: Nbgv
---
## What
Display the [Nerdbank.GitVersioning][nbgv] version.
:::warning
The Nerdbank.GitVersioning CLI can be a bit slow causing the prompt to feel slow.
:::
## Sample Configuration
```json
{
"type": "nbgv",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#ffffff",
"background": "#3a579a",
"properties": {
"prefix": " \uF1D2 "
}
}
```
## Properties
- template: `string` - A go [text/template][go-text-template] template extended with [sprig][sprig] utilizing the
properties below - defaults to `{{ .Version }}`
## Template Properties
- `.Version`: `string` - the current version
- `.AssemblyVersion`: `string` - the current assembly version
- `.AssemblyInformationalVersion`: `string` - the current assembly informational version
- `.NuGetPackageVersion`: `string` - the current nuget package version
- `.ChocolateyPackageVersion`: `string` - the current chocolatey package version
- `.NpmPackageVersion`: `string` - the current npm package version
- `.SimpleVersion`: `string` - the current simple version
[nbgv]: https://github.com/dotnet/Nerdbank.GitVersioning
[go-text-template]: https://golang.org/pkg/text/template/
[sprig]: https://masterminds.github.io/sprig/