Import-Module path_to_scoop\\apps\posh-git\1.1.0\posh-git.psd1
function Set-PoshGitStatus {
$global:GitStatus = Get-GitStatus
$env:POSH_GIT_STRING = Write-GitStatus -Status $global:GitStatus
}
New-Alias -Name 'Set-PoshContext' -Value 'Set-PoshGitStatus' -Scope Global -Force
oh-my-posh --init --shell pwsh --config 'path_to_omp_themes\fish.omp.json' | Invoke-Expression
Btw, thank you for such a great plugin, been using it for years and has been working very smoothly. Any help is appreciated!
I've specified my config below
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "right",
"segments": [
{
"foreground": "#ffffff",
"style": "diamond",
"template": " {{ .Env.POSH_GIT_STRING }} ",
"type": "git"
}
],
"type": "prompt"
},
{
"alignment": "left",
"segments": [
{
"foreground": "#ffffff",
"style": "plain",
"template": " {{ .Meaning }}",
"type": "exit"
},
{
"foreground": "#100e23",
"style": "plain",
"template": " \uf0e7 ",
"type": "root"
},
{
"background": "#343434",
"foreground": "#ffffff",
"style": "plain",
"template": " {{ .UserName }}@{{ .HostName }} \uf0a9 ",
"type": "session"
},
{
"background": "#343434",
"foreground": "#ffffff",
"properties": {
"folder_icon": "\uf115",
"folder_separator_icon": " \ue0b1 ",
"style": "full"
},
"style": "plain",
"template": "{{ .Path }} ",
"type": "path"
},
{
"background": "#343434",
"foreground": "#ffffff",
"style": "plain",
"template": "<#ffffff>\ue0b1</> {{ .HEAD }} ",
"type": "git"
},
{
"foreground": "#343434",
"style": "plain",
"template": "\ue0b0 ",
"type": "text"
}
],
"type": "prompt"
}
],
"version": 2
}
Code of Conduct
What happened?
I've been customizing the fish theme and according to the docs I installed posh-git since its convinient to use the $ENV:POST_GIT_STRING variable. It renders but on the left leaving a large gap before it (image 1) when using
it looks like this
produces this
This is where all the omp stuff is in my powershell profile
Btw, thank you for such a great plugin, been using it for years and has been working very smoothly. Any help is appreciated!
I've specified my config below
Theme
What OS are you seeing the problem on?
Windows
Which shell are you using?
powershell
Log output