mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-28 04:19:41 -08:00
feat(git): add .LatestTag template property
This commit is contained in:
parent
132756729e
commit
870ff86778
|
@ -832,3 +832,7 @@ func (g *Git) getSwitchMode(property properties.Property, gitSwitch, mode string
|
|||
}
|
||||
return fmt.Sprintf("%s%s", gitSwitch, mode)
|
||||
}
|
||||
|
||||
func (g *Git) LatestTag() string {
|
||||
return g.getGitCommandOutput("describe", "--tags", "--abbrev=0")
|
||||
}
|
||||
|
|
|
@ -158,6 +158,7 @@ You can set the following properties to `true` to enable fetching additional inf
|
|||
| `.Rebase` | `boolean` | true when in a rebase |
|
||||
| `.CherryPick` | `boolean` | true when in a cherry pick |
|
||||
| `.Revert` | `boolean` | true when in a revert |
|
||||
| `.LatestTag` | `string` | the latest tag name |
|
||||
|
||||
### Status
|
||||
|
||||
|
|
Loading…
Reference in a new issue