Closed johnascroft closed 1 year ago
@crowngasjohn I can't reproduce this with your config, does this also happen with only oh-my-posh in your .bashrc
?
Apologies, this is the "broken" config that causes the problem (if I remove enough segments, in this case the shell one although I don't think it's specific to that particular type):
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"type": "prompt",
"segments": [
{
"type": "path",
"background": "#3B4252",
"foreground": "#D8DEE9",
"properties": {
"style": "folder"
},
"style": "powerline",
"powerline_symbol": "",
"template": " \ue5ff {{ .Path }} "
},
{
"type": "git",
"background": "#81A0C1",
"foreground": "#3B4252",
"powerline_symbol": "",
"properties": {
"cherry_pick_icon": "\u2713 ",
"commit_icon": "\u25b7 ",
"fetch_status": true,
"merge_icon": "\u25f4 ",
"no_commits_icon": "[no commits]",
"fetch_upstream_icon": true,
"rebase_icon": "\u2c62 ",
"tag_icon": "\u25b6 "
},
"style": "powerline",
"template": "{{ if gt .Ahead 0 }} \u2191{{.Ahead}}{{end}}{{ if gt .Behind 0 }} \u2193{{.Behind}}{{end}}{{ if .Working.Changed }} +{{ .Working.Added }} ~{{ .Working.Modified }} -{{ .Working.Deleted }} {{ end }}"
},
{
"type": "root",
"background": "#ffc107",
"foreground": "#18354c",
"powerline_symbol": "",
"style": "powerline",
"template": " \uf0e7 "
}
]
}
],
"final_space": true,
"version": 2
}
If I remove everything from my .bashrc
file and just leave this, it's the same issue:
# Initialise oh-my-posh on start-up with my own config file
eval "$(oh-my-posh init bash --config ~/john.omp.json)"
@crowngasjohn same, can't reproduce it. Something else is interfering here locally. Do you have shell integrations enabled in Windows Terminal perhaps? I'm also using the Atlas engine (and preview Terminal on latest).
Code of Conduct
What happened?
When using oh-my-posh (latest version) with git bash (v2.42.0), within Microsoft Terminal (latest version) I'm getting weird behaviour when pasting commands in and pressing enter. It seems to repeat the first few characters upon pressing enter:
If I add some more segments to the config (for example adding the shell type segment), I don't seem to get the issue:
In both cases, the commands run as expected but it seems with a minimum length of segments it seems to have this weird behaviour.
Theme
What OS are you seeing the problem on?
Windows
Which shell are you using?
bash
Log output