Closed I-Good-Vegetable closed 1 year ago
@I-Good-Vegetable that’s a known Windows Terminal bug. You'll have to nudge them for a fix.
This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.
Code of Conduct
What happened?
After I revised the theme file as suggested in FAQ, I still get those unexpected spaces. Could you please let me know how to fix it? Many thanks I'm using PowerShell 7 on windows.
Theme
{ "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", "version": 2, "blocks": [ { "type": "prompt", "alignment": "left", "segments": [ { "type": "shell", "style": "diamond", "foreground": "#ffffff", "background": "#0077c2", "leading_diamond": "\u256d\u2500\ue0b6", "template": "\uf120 {{ .Name }} " }, { "type": "root", "style": "diamond", "foreground": "#FFFB38", "background": "#ef5350", "template": "\ue0b0</> \uf292 "
},
{
"type": "path",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "#2d3436",
"background": "#FF9248",
"template": " \uf07b\uf553{{ .Path }} ",
"properties": {
"folder_icon": " \uf07b ",
"home_icon": "\uf7dd",
"style": "folder"
}
},
{
"type": "git",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "#011627",
"background": "#FFFB38",
"background_templates": [
"{{ if or (.Working.Changed) (.Staging.Changed) }}#ffeb95{{ end }}",
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#c5e478{{ end }}",
"{{ if gt .Ahead 0 }}#C792EA{{ end }}",
"{{ if gt .Behind 0 }}#C792EA{{ end }}"
],
"template": " {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<#ef5350> \uf046 {{ .Staging.String }}</>{{ end }} ",
"properties": {
"branch_icon": "\ue725 ",
"fetch_status": true,
"fetch_upstream_icon": true
}
},
{
"type": "executiontime",
"style": "diamond",
"foreground": "#ffffff",
"background": "#83769c",
"trailing_diamond": "\ue0b4",
"template": " \ufa1e{{ .FormattedMs }}\u2800",
"properties": {
"always_enabled": true,
"style": "roundrock",
"template": "\ufbab\u2800",
"threshold": 0
}
}
]
},
{
"type": "prompt",
"alignment": "right",
"segments": [
{
"type": "node",
"style": "diamond",
"foreground": "#3C873A",
"background": "#303030",
"leading_diamond": "\ue0b6",
"trailing_diamond": "\ue0b4 ",
"template": "\ue718 {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }}",
"properties": {
"fetch_package_manager": true,
"npm_icon": " <#cc3a3a>\ue5fa</> ",
"yarn_icon": " <#348cba>\uf61a</>"
}
},
{
"type": "python",
"style": "diamond",
"foreground": "#FFE873",
"background": "#306998",
"leading_diamond": "\ue0b6",
"trailing_diamond": "\ue0b4 ",
"template": "\ue235 {{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }}{{ .Full }}{{ end }}"
},
{
"type": "java",
"style": "diamond",
"foreground": "#ec2729",
"background": "#0e8ac8",
"leading_diamond": "\ue0b6",
"trailing_diamond": "\ue0b4 ",
"template": "\ue738 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}"
},
{
"type": "dotnet",
"style": "diamond",
"foreground": "#0d6da8",
"background": "#0e0e0e",
"leading_diamond": "\ue0b6",
"trailing_diamond": "\ue0b4 ",
"template": "\ue77f {{ if .Unsupported }}\uf071{{ else }}{{ .Full }}{{ end }}"
},
{
"type": "go",
"style": "diamond",
"foreground": "#06aad5",
"background": "#ffffff",
"leading_diamond": "\ue0b6",
"trailing_diamond": "\ue0b4 ",
"template": "\ufcd1 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}"
},
{
"type": "rust",
"style": "diamond",
"foreground": "#925837",
"background": "#f3f0ec",
"leading_diamond": "\ue0b6",
"trailing_diamond": "\ue0b4 ",
"template": "\ue7a8 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}"
},
{
"type": "dart",
"style": "diamond",
"foreground": "#055b9c",
"background": "#e1e8e9",
"leading_diamond": " \ue0b6",
"trailing_diamond": "\ue0b4 ",
"template": "\ue798 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}"
},
{
"type": "angular",
"style": "diamond",
"foreground": "#ce092f",
"background": "#ffffff",
"leading_diamond": " \ue0b6",
"trailing_diamond": "\ue0b4 ",
"template": "\ue753 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}"
},
{
"type": "nx",
"style": "diamond",
"foreground": "#ffffff",
"background": "#1e293b",
"leading_diamond": " \ue0b6",
"trailing_diamond": "\ue0b4 ",
"template": "{{ if .Error }}{{ .Error }}{{ else }}Nx {{ .Full }}{{ end }}"
},
{
"type": "julia",
"style": "diamond",
"foreground": "#359a25",
"background": "#945bb3",
"leading_diamond": " \ue0b6",
"trailing_diamond": "\ue0b4 ",
"template": "<#ca3c34>\ue624</> {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}"
},
{
"type": "ruby",
"style": "diamond",
"foreground": "#9c1006",
"background": "#ffffff",
"leading_diamond": "\ue0b6",
"trailing_diamond": "\ue0b4 ",
"template": "\ue791 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}"
},
{
"type": "azfunc",
"style": "diamond",
"foreground": "#5398c2",
"background": "#ffffff",
"leading_diamond": "\ue0b6",
"trailing_diamond": "\ue0b4 ",
"template": "\uf104<#f5bf45>\uf0e7</>\uf105 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}"
},
{
"type": "aws",
"style": "diamond",
"foreground": "#faa029",
"background": "#565656",
"leading_diamond": "\ue0b6",
"trailing_diamond": "\ue0b4 ",
"template": "\ue7ad {{.Profile}}{{if .Region}}@{{.Region}}{{end}}"
},
{
"type": "kubectl",
"style": "diamond",
"foreground": "#ffffff",
"background": "#316ce4",
"leading_diamond": "\ue0b6",
"trailing_diamond": "\ue0b4",
"template": "\ufd31 {{.Context}}{{if .Namespace}} :: {{.Namespace}}{{end}}"
},
{
"type": "os",
"style": "diamond",
"foreground": "#222222",
"background": "#b2bec3",
"leading_diamond": "\ue0b6",
"template": " {{ if .WSL }}WSL at {{ end }}{{.Icon}}<#262626> \ue0b2</>",
"properties": {
"linux": "\ue712",
"macos": "\ue711",
"windows": "\ue70f"
}
},
{
"type": "battery",
"style": "diamond",
"invert_powerline": true,
"foreground": "#262626",
"background": "#f36943",
"background_templates": [
"{{if eq \"Charging\" .State.String}}#b8e994{{end}}",
"{{if eq \"Discharging\" .State.String}}#fff34e{{end}}",
"{{if eq \"Full\" .State.String}}#33DD2D{{end}}"
],
"leading_diamond": "\ue0b2",
"template": " {{ if not .Error }}{{ .Icon }}{{ .Percentage }}{{ end }}{{ .Error }}\uf295 <#262626>\ue0b2</>",
"properties": {
"charged_icon": "\uf58e ",
"charging_icon": "\uf1e6 ",
"discharging_icon": "\ue234 "
}
},
{
"type": "time",
"style": "diamond",
"invert_powerline": true,
"foreground": "#ffffff",
"background": "#40c4ff",
"leading_diamond": "\ue0b2",
"trailing_diamond": "\ue0b4",
"template": " \uf5ef {{ .CurrentDate | date .Format }} ",
"properties": {
"time_format": "_2,15:04"
}
}
]
},
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "text",
"style": "plain",
"foreground": "#21c7c7",
"template": "\u2570\u2500"
},
{
"type": "exit",
"style": "plain",
"foreground": "#e0f8ff",
"foreground_templates": [
"{{ if gt .Code 0 }}#ef5350{{ end }}"
],
"template": "\ue285\ufb00 ",
"properties": {
"always_enabled": true
}
}
],
"newline": true
}
]
}
What OS are you seeing the problem on?
Windows
Which shell are you using?
powershell
Log output