mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-03-05 20:49:04 -08:00
fix(git): remove trailing space from upstream icons
This commit is contained in:
parent
a8f97f5aa2
commit
f277c191b1
|
@ -492,19 +492,19 @@ func (g *Git) getUpstreamIcon() string {
|
||||||
Icon properties.Property
|
Icon properties.Property
|
||||||
Default string
|
Default string
|
||||||
}{
|
}{
|
||||||
"github": {GithubIcon, "\uF408 "},
|
"github": {GithubIcon, "\uF408"},
|
||||||
"gitlab": {GitlabIcon, "\uF296 "},
|
"gitlab": {GitlabIcon, "\uF296"},
|
||||||
"bitbucket": {BitbucketIcon, "\uF171 "},
|
"bitbucket": {BitbucketIcon, "\uF171"},
|
||||||
"dev.azure.com": {AzureDevOpsIcon, "\uEBE8 "},
|
"dev.azure.com": {AzureDevOpsIcon, "\uEBE8"},
|
||||||
"visualstudio.com": {AzureDevOpsIcon, "\uEBE8 "},
|
"visualstudio.com": {AzureDevOpsIcon, "\uEBE8"},
|
||||||
"codecommit": {CodeCommit, "\uF270 "},
|
"codecommit": {CodeCommit, "\uF270"},
|
||||||
}
|
}
|
||||||
for key, value := range defaults {
|
for key, value := range defaults {
|
||||||
if strings.Contains(g.UpstreamURL, key) {
|
if strings.Contains(g.UpstreamURL, key) {
|
||||||
return g.props.GetString(value.Icon, value.Default)
|
return g.props.GetString(value.Icon, value.Default)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return g.props.GetString(GitIcon, "\uE5FB ")
|
return g.props.GetString(GitIcon, "\uE5FB")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *Git) setGitStatus() {
|
func (g *Git) setGitStatus() {
|
||||||
|
|
|
@ -183,7 +183,7 @@ func TestEnabledInBareRepo(t *testing.T) {
|
||||||
FetchRemote: true,
|
FetchRemote: true,
|
||||||
Remote: "origin",
|
Remote: "origin",
|
||||||
RemoteURL: "git@github.com:JanDeDobbeleer/oh-my-posh.git",
|
RemoteURL: "git@github.com:JanDeDobbeleer/oh-my-posh.git",
|
||||||
ExpectedRemote: "\uf408 ",
|
ExpectedRemote: "\uf408",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
for _, tc := range cases {
|
for _, tc := range cases {
|
||||||
|
|
|
@ -111,12 +111,12 @@ You can set the following properties to `true` to enable fetching additional inf
|
||||||
|
|
||||||
| Name | Type | Description |
|
| Name | Type | Description |
|
||||||
| ------------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `github_icon` | `string` | icon/text to display when the upstream is Github - defaults to `\uF408 ` |
|
| `github_icon` | `string` | icon/text to display when the upstream is Github - defaults to `\uF408` |
|
||||||
| `gitlab_icon` | `string` | icon/text to display when the upstream is Gitlab - defaults to `\uF296 ` |
|
| `gitlab_icon` | `string` | icon/text to display when the upstream is Gitlab - defaults to `\uF296` |
|
||||||
| `bitbucket_icon` | `string` | icon/text to display when the upstream is Bitbucket - defaults to `\uF171 ` |
|
| `bitbucket_icon` | `string` | icon/text to display when the upstream is Bitbucket - defaults to `\uF171` |
|
||||||
| `azure_devops_icon` | `string` | icon/text to display when the upstream is Azure DevOps - defaults to `\uEBE8 ` |
|
| `azure_devops_icon` | `string` | icon/text to display when the upstream is Azure DevOps - defaults to `\uEBE8` |
|
||||||
| `codecommit_icon` | `string` | icon/text to display when the upstream is AWS CodeCommit - defaults to `\uF270 ` |
|
| `codecommit_icon` | `string` | icon/text to display when the upstream is AWS CodeCommit - defaults to `\uF270` |
|
||||||
| `git_icon` | `string` | icon/text to display when the upstream is not known/mapped - defaults to `\uE5FB ` |
|
| `git_icon` | `string` | icon/text to display when the upstream is not known/mapped - defaults to `\uE5FB` |
|
||||||
| `upstream_icons` | `map[string]string` | a key, value map representing the remote URL (or a part of that URL) and icon to use in case the upstream URL contains the key. These get precedence over the standard icons |
|
| `upstream_icons` | `map[string]string` | a key, value map representing the remote URL (or a part of that URL) and icon to use in case the upstream URL contains the key. These get precedence over the standard icons |
|
||||||
|
|
||||||
## Template ([info][templates])
|
## Template ([info][templates])
|
||||||
|
@ -157,7 +157,7 @@ You can set the following properties to `true` to enable fetching additional inf
|
||||||
| `.Rebase` | `boolean` | true when in a rebase |
|
| `.Rebase` | `boolean` | true when in a rebase |
|
||||||
| `.CherryPick` | `boolean` | true when in a cherry pick |
|
| `.CherryPick` | `boolean` | true when in a cherry pick |
|
||||||
| `.Revert` | `boolean` | true when in a revert |
|
| `.Revert` | `boolean` | true when in a revert |
|
||||||
| `.LatestTag` | `string` | the latest tag name |
|
| `.LatestTag` | `string` | the latest tag name |
|
||||||
|
|
||||||
### Status
|
### Status
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue