oh-my-posh: `parentBackground` breaks last symbol in `powerline` and `diamond`
Code of Conduct
- I agree to follow this project’s Code of Conduct
What happened?
- Let’s take the default Aliens theme.
- Change a
backgroundfield toparentBackgroundlike in my images below. - We’ve got a glitch.
| Screenshot with git | Screenshot without git |
|---|---|
![]() |
![]() |
I’ve been using Oh My Posh from the very beginning, just upgraded from an old version. While it doesn’t give me the same depth of control as the PowerShell version did, to be honest, it still makes me very happy. Thank you for creating a great tool.
Theme
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "session",
"style": "diamond",
"foreground": "#ffffff",
"background": "#61AFEF",
"leading_diamond": "\uE0B6",
"trailing_diamond": "\uE0B0"
},
{
"type": "path",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#ffffff",
"background": "parentBackground",
"properties": {
"style": "full"
}
},
{
"type": "git",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#193549",
"background": "#95ffa4",
"properties": {
"template": "{{ .HEAD }}"
}
},
{
"type": "python",
"style": "diamond",
"foreground": "#ffffff",
"background": "parentBackground",
"leading_diamond": "<transparent,background>\uE0B0</>",
"trailing_diamond": "\uE0B4"
}
]
}
],
"final_space": true
}
What OS are you seeing the problem on?
Linux
Which shell are you using?
bash, powershell
Log output
Version: 6.33.0
Segments:
ConsoleTitle(false) - 0 ms -
session(true) - 0 ms - thanhph111@T-1000
path(true) - 0 ms - ~/Desktop/temp
git(true) - 0 ms - master
python(false) - 0 ms -
Run duration: 693.702µs
Logs:
2021/12/14 23:50:44 debug: getenv
2021/12/14 23:50:44 getenv duration: 4.615µs, args: XDG_CACHE_HOME
2021/12/14 23:50:44 getCachePath duration: 16.294µs, args:
2021/12/14 23:50:44 getArgs duration: 57ns, args:
2021/12/14 23:50:44 getArgs duration: 29ns, args:
2021/12/14 23:50:44 getShellName duration: 190ns, args:
2021/12/14 23:50:44 debug: getenv
2021/12/14 23:50:44 getenv duration: 1.164µs, args: OMP_CACHE_DISABLED
2021/12/14 23:50:44 isRunningAsRoot duration: 543ns, args:
2021/12/14 23:50:44 getcwd duration: 14.346µs, args:
2021/12/14 23:50:44 getPathSeperator duration: 46ns, args:
2021/12/14 23:50:44 getPathSeperator duration: 27ns, args:
2021/12/14 23:50:44 getPathSeperator duration: 28ns, args:
2021/12/14 23:50:44 getPathSeperator duration: 30ns, args:
2021/12/14 23:50:44 getPathSeperator duration: 42ns, args:
2021/12/14 23:50:44 getPathSeperator duration: 29ns, args:
2021/12/14 23:50:44 getShellName duration: 66ns, args:
2021/12/14 23:50:44 getCurrentUser duration: 154ns, args:
2021/12/14 23:50:44 getHostName duration: 1.31µs, args:
2021/12/14 23:50:44 getcwd duration: 82ns, args:
2021/12/14 23:50:44 debug: getenv
2021/12/14 23:50:44 getenv duration: 989ns, args: SSH_CONNECTION
2021/12/14 23:50:44 debug: getenv
2021/12/14 23:50:44 getenv duration: 770ns, args: SSH_CLIENT
2021/12/14 23:50:44 getCurrentUser duration: 188ns, args:
2021/12/14 23:50:44 getRuntimeGOOS duration: 46ns, args:
2021/12/14 23:50:44 getHostName duration: 873ns, args:
2021/12/14 23:50:44 debug: getenv
2021/12/14 23:50:44 getenv duration: 606ns, args: POSH_SESSION_DEFAULT_USER
2021/12/14 23:50:44 getcwd duration: 58ns, args:
2021/12/14 23:50:44 getcwd duration: 27ns, args:
2021/12/14 23:50:44 getArgs duration: 33ns, args:
2021/12/14 23:50:44 getcwd duration: 31ns, args:
2021/12/14 23:50:44 getRuntimeGOOS duration: 33ns, args:
2021/12/14 23:50:44 getRuntimeGOOS duration: 29ns, args:
2021/12/14 23:50:44 getPathSeperator duration: 49ns, args:
2021/12/14 23:50:44 getRuntimeGOOS duration: 28ns, args:
2021/12/14 23:50:44 getcwd duration: 37ns, args:
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16 (8 by maintainers)
Commits related to this issue
- fix: do not print empty powerline symbol relates to #1433 — committed to JanDeDobbeleer/oh-my-posh by JanDeDobbeleer 3 years ago
- fix: do not print empty powerline symbol relates to #1433 — committed to JanDeDobbeleer/oh-my-posh by JanDeDobbeleer 3 years ago


Sorry for that, I’ve just realized I don’t have to put
powerline_symbolto followed segments anymore, that’s amazing. Thanks a lot, man. You’re brilliant.