Repository: JanDeDobbeleer/oh-my-posh
Pull request #2747 (2022-09-04 15:52:41)

feat(posh-git): parse environment variable
### Prerequisites

- [x] I have read and understood the [contributing guide][CONTRIBUTING.md]
- [x] The commit message follows the [conventional commits][cc] guidelines
- [x] Tests for the changes have been added (for bug fixes/features)
- [x] Docs have been added/updated (for bug fixes/features)

### Description

Removes the posh-git segment but allows the user to leverage the posh-git output just like the regular git segment.
This is a breaking change.

[CONTRIBUTING.md]: https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/CONTRIBUTING.md
[cc]: https://www.conventionalcommits.org/en/v1.0.0/#summary



Patch:
diff --git a/src/engine/segment.go b/src/engine/segment.go
index 87e85fbe..4b4a8d74 100644
--- a/src/engine/segment.go
+++ b/src/engine/segment.go
@@ -306,7 +306,6 @@ func (segment *Segment) mapSegmentWithWriter(env environment.Environment) error
 		PERL:          &segments.Perl{},
 		PHP:           &segments.Php{},
 		PLASTIC:       &segments.Plastic{},
-		POSHGIT:       &segments.PoshGit{},
 		PROJECT:       &segments.Project{},
 		PYTHON:        &segments.Python{},
 		R:             &segments.R{},
diff --git a/src/segments/git.go b/src/segments/git.go
index e88fa409..abf673e7 100644
--- a/src/segments/git.go
+++ b/src/segments/git.go
@@ -92,34 +92,44 @@ const (
 type Git struct {
 	scm
 
-	Working       *GitStatus
-	Staging       *GitStatus
-	Ahead         int
-	Behind        int
-	HEAD          string
-	Ref           string
-	Hash          string
-	ShortHash     string
-	BranchStatus  string
-	Upstream      string
-	UpstreamIcon  string
-	UpstreamURL   string
-	UpstreamGone  bool
-	StashCount    int
-	WorktreeCount int
-	IsWorkTree    bool
-	RepoName      string
+	Working        *GitStatus
+	Staging        *GitStatus
+	Ahead          int
+	Behind         int
+	HEAD           string
+	Ref            string
+	Hash           string
+	ShortHash      string
+	BranchStatus   string
+	Upstream       string
+	UpstreamIcon   string
+	UpstreamURL    string
+	RawUpstreamURL string
+	UpstreamGone   bool
+	StashCount     int
+	WorktreeCount  int
+	IsWorkTree     bool
+	RepoName       string
 }
 
 func (g *Git) Template() string {
-	return " {{ .HEAD }} {{ .BranchStatus }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}} \uF692 {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} \uf1bb {{ .WorktreeCount }}{{ end }} " //nolint: lll
+	return " {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}} \uF692 {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} \uf1bb {{ .WorktreeCount }}{{ end }} " //nolint: lll
 }
 
 func (g *Git) Enabled() bool {
 	if !g.shouldDisplay() {
 		return false
 	}
+
 	g.RepoName = environment.Base(g.env, g.convertToLinuxPath(g.realDir))
+	if g.props.GetBool(FetchWorktreeCount, false) {
+		g.WorktreeCount = g.getWorktreeContext()
+	}
+
+	if g.hasPoshGitStatus() {
+		return true
+	}
+
 	displayStatus := g.props.GetBool(FetchStatus, false)
 	if displayStatus {
 		g.setGitStatus()
@@ -130,22 +140,27 @@ func (g *Git) Enabled() bool {
 		g.Working = &GitStatus{}
 		g.Staging = &GitStatus{}
 	}
-	if g.Upstream != "" && g.props.GetBool(FetchUpstreamIcon, false) {
+	if len(g.Upstream) != 0 && g.props.GetBool(FetchUpstreamIcon, false) {
 		g.UpstreamIcon = g.getUpstreamIcon()
 	}
 	if g.props.GetBool(FetchStashCount, false) {
 		g.StashCount = g.getStashContext()
 	}
-	if g.props.GetBool(FetchWorktreeCount, false) {
-		g.WorktreeCount = g.getWorktreeContext()
-	}
 	return true
 }
 
 func (g *Git) Kraken() string {
 	root := g.getGitCommandOutput("rev-list", "--max-parents=0", "HEAD")
-	remote := g.getGitCommandOutput("remote", "get-url", "origin")
-	return fmt.Sprintf("gitkraken://repolink/%s/commit/%s?url=%s", root, g.Hash, url2.QueryEscape(remote))
+	if len(g.RawUpstreamURL) == 0 {
+		if len(g.Upstream) == 0 {
+			g.Upstream = "origin"
+		}
+		g.RawUpstreamURL = g.getOriginURL()
+	}
+	if len(g.Hash) == 0 {
+		g.Hash = g.getGitCommandOutput("rev-parse", "HEAD")
+	}
+	return fmt.Sprintf("gitkraken://repolink/%s/commit/%s?url=%s", root, g.Hash, url2.QueryEscape(g.RawUpstreamURL))
 }
 
 func (g *Git) shouldDisplay() bool {
@@ -166,12 +181,7 @@ func (g *Git) shouldDisplay() bool {
 		return false
 	}
 
-	dir := environment.ReplaceHomeDirPrefixWithTilde(g.env, gitdir.Path) // align with template PWD
-	if g.env.GOOS() == environment.WINDOWS {
-		g.Dir = strings.TrimSuffix(dir, `\.git`)
-	} else {
-		g.Dir = strings.TrimSuffix(dir, "/.git")
-	}
+	g.setDir(gitdir.Path)
 
 	if !gitdir.IsDir {
 		return g.hasWorktree(gitdir)
@@ -184,6 +194,15 @@ func (g *Git) shouldDisplay() bool {
 	return true
 }
 
+func (g *Git) setDir(dir string) {
+	dir = environment.ReplaceHomeDirPrefixWithTilde(g.env, dir) // align with template PWD
+	if g.env.GOOS() == environment.WINDOWS {
+		g.Dir = strings.TrimSuffix(dir, `\.git`)
+		return
+	}
+	g.Dir = strings.TrimSuffix(dir, "/.git")
+}
+
 func (g *Git) hasWorktree(gitdir *environment.FileInfo) bool {
 	g.rootDir = gitdir.Path
 	dirPointer := strings.Trim(g.env.FileContent(gitdir.Path), " \r\n")
@@ -244,19 +263,19 @@ func (g *Git) hasWorktree(gitdir *environment.FileInfo) bool {
 func (g *Git) setBranchStatus() {
 	getBranchStatus := func() string {
 		if g.Ahead > 0 && g.Behind > 0 {
-			return fmt.Sprintf(" %s%d %s%d", g.props.GetString(BranchAheadIcon, "\u2191"), g.Ahead, g.props.GetString(BranchBehindIcon, "\u2193"), g.Behind)
+			return fmt.Sprintf("%s%d %s%d", g.props.GetString(BranchAheadIcon, "\u2191"), g.Ahead, g.props.GetString(BranchBehindIcon, "\u2193"), g.Behind)
 		}
 		if g.Ahead > 0 {
-			return fmt.Sprintf(" %s%d", g.props.GetString(BranchAheadIcon, "\u2191"), g.Ahead)
+			return fmt.Sprintf("%s%d", g.props.GetString(BranchAheadIcon, "\u2191"), g.Ahead)
 		}
 		if g.Behind > 0 {
-			return fmt.Sprintf(" %s%d", g.props.GetString(BranchBehindIcon, "\u2193"), g.Behind)
+			return fmt.Sprintf("%s%d", g.props.GetString(BranchBehindIcon, "\u2193"), g.Behind)
 		}
 		if g.UpstreamGone {
-			return fmt.Sprintf(" %s", g.props.GetString(BranchGoneIcon, "\u2262"))
+			return g.props.GetString(BranchGoneIcon, "\u2262")
 		}
 		if g.Behind == 0 && g.Ahead == 0 && g.Upstream != "" {
-			return fmt.Sprintf(" %s", g.props.GetString(BranchIdenticalIcon, "\u2261"))
+			return g.props.GetString(BranchIdenticalIcon, "\u2261")
 		}
 		return ""
 	}
@@ -264,8 +283,18 @@ func (g *Git) setBranchStatus() {
 }
 
 func (g *Git) getUpstreamIcon() string {
-	upstream := regex.ReplaceAllString("/.*", g.Upstream, "")
-	g.UpstreamURL = g.getOriginURL(upstream)
+	cleanSSHURL := func(url string) string {
+		if strings.HasPrefix(url, "http") {
+			return url
+		}
+		url = strings.TrimPrefix(url, "git://")
+		url = strings.TrimPrefix(url, "git@")
+		url = strings.TrimSuffix(url, ".git")
+		url = strings.ReplaceAll(url, ":", "/")
+		return fmt.Sprintf("https://%s", url)
+	}
+	g.RawUpstreamURL = g.getOriginURL()
+	g.UpstreamURL = cleanSSHURL(g.RawUpstreamURL)
 	if strings.Contains(g.UpstreamURL, "github") {
 		return g.props.GetString(GithubIcon, "\uF408 ")
 	}
@@ -539,28 +568,17 @@ func (g *Git) getWorktreeContext() int {
 	return count
 }
 
-func (g *Git) getOriginURL(upstream string) string {
-	cleanSSHURL := func(url string) string {
-		if strings.HasPrefix(url, "http") {
-			return url
-		}
-		url = strings.TrimPrefix(url, "git://")
-		url = strings.TrimPrefix(url, "git@")
-		url = strings.TrimSuffix(url, ".git")
-		url = strings.ReplaceAll(url, ":", "/")
-		return fmt.Sprintf("https://%s", url)
-	}
-	var url string
+func (g *Git) getOriginURL() string {
+	upstream := regex.ReplaceAllString("/.*", g.Upstream, "")
 	cfg, err := ini.Load(g.rootDir + "/config")
 	if err != nil {
-		url = g.getGitCommandOutput("remote", "get-url", upstream)
-		return cleanSSHURL(url)
+		return g.getGitCommandOutput("remote", "get-url", upstream)
 	}
-	url = cfg.Section("remote \"" + upstream + "\"").Key("url").String()
-	if url == "" {
+	url := cfg.Section("remote \"" + upstream + "\"").Key("url").String()
+	if len(url) == 0 {
 		url = g.getGitCommandOutput("remote", "get-url", upstream)
 	}
-	return cleanSSHURL(url)
+	return url
 }
 
 func (g *Git) getUntrackedFilesMode() string {
diff --git a/src/segments/posh_git.go b/src/segments/posh_git.go
index 475ce6ce..44050014 100644
--- a/src/segments/posh_git.go
+++ b/src/segments/posh_git.go
@@ -1,33 +1,88 @@
 package segments
 
 import (
-	"oh-my-posh/environment"
-	"oh-my-posh/properties"
+	"encoding/json"
+	"fmt"
 	"strings"
 )
 
-type PoshGit struct {
-	props properties.Properties
-	env   environment.Environment
-
-	Status string
-}
-
 const (
 	poshGitEnv = "POSH_GIT_STATUS"
 )
 
-func (p *PoshGit) Template() string {
-	return " {{ .Status }} "
+type poshGit struct {
+	StashCount   int            `json:"StashCount"`
+	AheadBy      int            `json:"AheadBy"`
+	Index        *poshGitStatus `json:"Index"`
+	RepoName     string         `json:"RepoName"`
+	HasWorking   bool           `json:"HasWorking"`
+	Branch       string         `json:"Branch"`
+	HasIndex     bool           `json:"HasIndex"`
+	GitDir       string         `json:"GitDir"`
+	BehindBy     int            `json:"BehindBy"`
+	HasUntracked bool           `json:"HasUntracked"`
+	Working      *poshGitStatus `json:"Working"`
+	Upstream     string         `json:"Upstream"`
+}
+
+type poshGitStatus struct {
+	Added    []string `json:"Added"`
+	Modified []string `json:"Modified"`
+	Deleted  []string `json:"Deleted"`
+	Unmerged []string `json:"Unmerged"`
+}
+
+func (s *GitStatus) parsePoshGitStatus(p *poshGitStatus) {
+	if p == nil {
+		return
+	}
+	s.Added = len(p.Added)
+	s.Deleted = len(p.Deleted)
+	s.Modified = len(p.Modified)
+	s.Unmerged = len(p.Unmerged)
 }
 
-func (p *PoshGit) Enabled() bool {
-	status := p.env.Getenv(poshGitEnv)
-	p.Status = strings.TrimSpace(status)
-	return p.Status != ""
+func (g *Git) hasPoshGitStatus() bool {
+	envStatus := g.env.Getenv(poshGitEnv)
+	if len(envStatus) == 0 {
+		return false
+	}
+	var posh poshGit
+	err := json.Unmarshal([]byte(envStatus), &posh)
+	if err != nil {
+		return false
+	}
+	g.setDir(posh.GitDir)
+	g.Working = &GitStatus{}
+	g.Working.parsePoshGitStatus(posh.Working)
+	g.Staging = &GitStatus{}
+	g.Staging.parsePoshGitStatus(posh.Index)
+	g.HEAD = g.parsePoshGitHEAD(posh.Branch)
+	g.StashCount = posh.StashCount
+	g.Ahead = posh.AheadBy
+	g.Behind = posh.BehindBy
+	g.UpstreamGone = len(posh.Upstream) == 0
+	g.Upstream = posh.Upstream
+	g.setBranchStatus()
+	if len(g.Upstream) != 0 && g.props.GetBool(FetchUpstreamIcon, false) {
+		g.UpstreamIcon = g.getUpstreamIcon()
+	}
+	return true
 }
 
-func (p *PoshGit) Init(props properties.Properties, env environment.Environment) {
-	p.props = props
-	p.env = env
+func (g *Git) parsePoshGitHEAD(head string) string {
+	// commit
+	if strings.HasSuffix(head, "...)") {
+		head = strings.TrimLeft(head, "(")
+		head = strings.TrimRight(head, ".)")
+		return fmt.Sprintf("%s%s", g.props.GetString(CommitIcon, "\uF417"), head)
+	}
+	// tag
+	if strings.HasPrefix(head, "(") {
+		head = strings.TrimLeft(head, "(")
+		head = strings.TrimRight(head, ")")
+		return fmt.Sprintf("%s%s", g.props.GetString(TagIcon, "\uF412"), head)
+	}
+	// regular branch
+	return fmt.Sprintf("%s%s", g.props.GetString(BranchIcon, "\uE0A0"), g.formatHEAD(head))
 }
diff --git a/src/shell/scripts/omp.ps1 b/src/shell/scripts/omp.ps1
index be5121ef..8594ccee 100644
--- a/src/shell/scripts/omp.ps1
+++ b/src/shell/scripts/omp.ps1
@@ -97,7 +97,7 @@ New-Module -Name "oh-my-posh-core" -ScriptBlock {
         if ($env:POSH_GIT_ENABLED -eq $true) {
             # We need to set the status so posh-git can facilitate autocomplete
             $global:GitStatus = Get-GitStatus
-            $env:POSH_GIT_STATUS = Write-GitStatus -Status $global:GitStatus
+            $env:POSH_GIT_STATUS = $global:GitStatus | ConvertTo-Json
         }
     }
 
@@ -338,6 +338,9 @@ Example:
         # the output can be multiline, joining these ensures proper rendering by adding line breaks with `n
         $standardOut -join "`n"
 
+        # remove any posh-git status
+        $env:POSH_GIT_STATUS = $null
+
         # restore the orignal last exit code
         $global:LASTEXITCODE = $script:OriginalLastExitCode
     }
diff --git a/themes/1_shell.omp.json b/themes/1_shell.omp.json
index 069084ce..d3b4a893 100644
--- a/themes/1_shell.omp.json
+++ b/themes/1_shell.omp.json
@@ -34,7 +34,7 @@
             "fetch_worktree_count": true
           },
           "style": "diamond",
-          "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ 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 }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
           "type": "git"
         }
       ],
diff --git a/themes/atomic.omp.json b/themes/atomic.omp.json
index 0a461a54..2e7bdc69 100644
--- a/themes/atomic.omp.json
+++ b/themes/atomic.omp.json
@@ -48,7 +48,7 @@
             "fetch_upstream_icon": true
           },
           "style": "powerline",
-          "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<#ef5350> \uf046 {{ .Staging.String }}</>{{ 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 }} ",
           "type": "git"
         },
         {
diff --git a/themes/bubblesextra.omp.json b/themes/bubblesextra.omp.json
index b1fdf859..bf6ea534 100644
--- a/themes/bubblesextra.omp.json
+++ b/themes/bubblesextra.omp.json
@@ -33,7 +33,7 @@
             "fetch_upstream_icon": true
           },
           "style": "diamond",
-          "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ 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 }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
           "trailing_diamond": "\ue0b4",
           "type": "git"
         },
diff --git a/themes/chips.omp.json b/themes/chips.omp.json
index 1aae15f2..7fe6a90c 100644
--- a/themes/chips.omp.json
+++ b/themes/chips.omp.json
@@ -30,7 +30,7 @@
           "foreground": "p:c-badge-text",
           "leading_diamond": " \uE0B6",
           "style": "diamond",
-          "template": "{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uE0B1 \uF448 ({{ .Working.String }}){{ end }}{{ if and .Working.Changed .Staging.Changed }} \uE621 {{ end }}{{ if .Staging.Changed }}{{ if not .Working.Changed }} \uE0B1 {{ end }}\uF854 ({{ .Staging.String }}){{ end }}{{ if .StashCount }} \uE621 \uF6FC {{ .StashCount }} Stash{{ if gt .StashCount 1 }}es{{ end }}{{ end }}",
+          "template": "{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uE0B1 \uF448 ({{ .Working.String }}){{ end }}{{ if and .Working.Changed .Staging.Changed }} \uE621 {{ end }}{{ if .Staging.Changed }}{{ if not .Working.Changed }} \uE0B1 {{ end }}\uF854 ({{ .Staging.String }}){{ end }}{{ if .StashCount }} \uE621 \uF6FC {{ .StashCount }} Stash{{ if gt .StashCount 1 }}es{{ end }}{{ end }}",
           "properties": {
             "branch_icon": "\uE0A0 ",
             "branch_ahead_icon": "\uE621 \uF9AC ",
diff --git a/themes/clean-detailed.omp.json b/themes/clean-detailed.omp.json
index fe0012b8..4803c20e 100644
--- a/themes/clean-detailed.omp.json
+++ b/themes/clean-detailed.omp.json
@@ -75,7 +75,7 @@
             "fetch_worktree_count": true
           },
           "style": "diamond",
-          "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ 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 }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
           "trailing_diamond": "\ue0b0",
           "type": "git"
         }
diff --git a/themes/cloud-native-azure.omp.json b/themes/cloud-native-azure.omp.json
index 0f603397..5b99e7f4 100644
--- a/themes/cloud-native-azure.omp.json
+++ b/themes/cloud-native-azure.omp.json
@@ -40,7 +40,7 @@
             "fetch_upstream_icon": true
           },
           "style": "powerline",
-          "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ 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 }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
           "type": "git"
         },
         {
diff --git a/themes/default.omp.json b/themes/default.omp.json
index b2a740ee..a9f03ac0 100644
--- a/themes/default.omp.json
+++ b/themes/default.omp.json
@@ -50,7 +50,7 @@
             "github_icon": "\uf7a3"
           },
           "style": "powerline",
-          "template": " {{ if .UpstreamURL }}{{ url .UpstreamIcon .UpstreamURL }} {{ end }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }} ",
+          "template": " {{ if .UpstreamURL }}{{ url .UpstreamIcon .UpstreamURL }} {{ end }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }} ",
           "type": "git"
         },
         {
diff --git a/themes/devious-diamonds.omp.yaml b/themes/devious-diamonds.omp.yaml
index 0040feef..00e8895e 100644
--- a/themes/devious-diamonds.omp.yaml
+++ b/themes/devious-diamonds.omp.yaml
@@ -174,7 +174,7 @@ blocks:
           fetch_status: true
           fetch_upstream_icon: true
           fetch_worktree_count: true
-        template: "{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }}  {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}  {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }}  {{ .StashCount }}{{ end }}"
+        template: "{{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}  {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}  {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }}  {{ .StashCount }}{{ end }}"
   - type: prompt
     alignment: left
     newline: true
diff --git a/themes/di4am0nd.omp.json b/themes/di4am0nd.omp.json
index df5597fc..49bee834 100644
--- a/themes/di4am0nd.omp.json
+++ b/themes/di4am0nd.omp.json
@@ -25,7 +25,7 @@
             "fetch_status": true
           },
           "style": "plain",
-          "template": "<#ffffff>on</> {{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }} ",
+          "template": "<#ffffff>on</> {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }} ",
           "type": "git"
         },
         {
diff --git a/themes/easy-term.omp.json b/themes/easy-term.omp.json
index 600bd952..a7fbc16e 100644
--- a/themes/easy-term.omp.json
+++ b/themes/easy-term.omp.json
@@ -66,7 +66,7 @@
             "fetch_status": true,
             "fetch_upstream_icon": true
           },
-          "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ 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 }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
           "trailing_diamond": "\ue0b4",
           "type": "git"
         }
@@ -153,4 +153,4 @@
   ],
   "final_space": true,
   "version": 2
-}
\ No newline at end of file
+}
diff --git a/themes/emodipt-extend.omp.json b/themes/emodipt-extend.omp.json
index 1eb9bacc..389362ad 100644
--- a/themes/emodipt-extend.omp.json
+++ b/themes/emodipt-extend.omp.json
@@ -1,117 +1,117 @@
-{
-    "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
-    "blocks": [
-      {
-        "alignment": "left",
-        "segments": [
-          {
-            "foreground": "#E5C07B",
-            "properties": {
-              "time_format": "15:04"
-            },
-            "style": "plain",
-            "template": "[{{ .CurrentDate | date .Format }}]",
-            "type": "time"
-          },
-          {
-            "type": "shell",
-            "style": "plain",
-            "foreground": "#E06C75",
-            "properties": {
-              "mapped_shell_names": {
-                "pwsh": "Shell",
-                "powershell": "Shell",
-                "cmd": "Cmd",
-                "bash": "Bash"
-              }
-            },
-            "template": " \ue795 {{ .Name }}"
-          },
-          {
-            "foreground": "#F3C267",
-            "foreground_templates": [
-              "{{ if or (.Working.Changed) (.Staging.Changed) }}#FF9248{{ end }}",
-              "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ff4500{{ end }}",
-              "{{ if gt .Ahead 0 }}#B388FF{{ end }}",
-              "{{ if gt .Behind 0 }}#B388FF{{ end }}"
-            ],
-            "properties": {
-              "branch_max_length": 25,
-              "fetch_stash_count": true,
-              "fetch_status": true,
-              "fetch_upstream_icon": true
-            },
-            "style": "plain",
-            "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
-            "type": "git"
-          }
-        ],
-        "type": "prompt"
-      },
-      {
-        "alignment": "right",
-        "segments": [
-          {
-            "type": "exit",
-            "style": "plain",
-            "foreground": "#b8ff75",
-            "foreground_templates": [
-              "{{ if gt .Code 0 }}#E06C75{{ end }}"
-            ],
-            "template": " x{{ .Meaning }}"
-          },
-          {
-            "foreground": "#b8ff75",
-            "foreground_templates": [
-              "{{ if gt .Code 0 }}#E06C75{{ end }}"
-            ],
-            "properties": {
-              "style": "roundrock",
-              "always_enabled": true
-            },
-            "style": "diamond",
-            "template": " {{ .FormattedMs }} ",
-            "type": "executiontime"
-          }          
-        ],
-        "type": "prompt"
-      },
-      {
-        "alignment": "left",
-        "newline": true,
-        "segments": [
-          {
-            "foreground": "#61AFEF",
-            "properties": {
-              "style": "full"
-            },
-            "style": "plain",
-            "template": "\ue5ff {{ .Path }}",
-            "type": "path"
-          }
-        ],
-        "type": "prompt"
-      },
-      {
-        "alignment": "left",
-        "newline": true,
-        "segments": [          
-          {
-            "foreground": "#E06C75",
-            "style": "plain",
-            "template": "\u0021",
-            "type": "root"
-          },
-          {
-            "foreground": "#E06C75",
-            "style": "plain",
-            "template": "\u276f",
-            "type": "text"
-          }
-        ],
-        "type": "prompt"
-      }
-    ],
-    "final_space": true,
-    "version": 2
-  }
+{
+    "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
+    "blocks": [
+      {
+        "alignment": "left",
+        "segments": [
+          {
+            "foreground": "#E5C07B",
+            "properties": {
+              "time_format": "15:04"
+            },
+            "style": "plain",
+            "template": "[{{ .CurrentDate | date .Format }}]",
+            "type": "time"
+          },
+          {
+            "type": "shell",
+            "style": "plain",
+            "foreground": "#E06C75",
+            "properties": {
+              "mapped_shell_names": {
+                "pwsh": "Shell",
+                "powershell": "Shell",
+                "cmd": "Cmd",
+                "bash": "Bash"
+              }
+            },
+            "template": " \ue795 {{ .Name }}"
+          },
+          {
+            "foreground": "#F3C267",
+            "foreground_templates": [
+              "{{ if or (.Working.Changed) (.Staging.Changed) }}#FF9248{{ end }}",
+              "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ff4500{{ end }}",
+              "{{ if gt .Ahead 0 }}#B388FF{{ end }}",
+              "{{ if gt .Behind 0 }}#B388FF{{ end }}"
+            ],
+            "properties": {
+              "branch_max_length": 25,
+              "fetch_stash_count": true,
+              "fetch_status": true,
+              "fetch_upstream_icon": true
+            },
+            "style": "plain",
+            "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
+            "type": "git"
+          }
+        ],
+        "type": "prompt"
+      },
+      {
+        "alignment": "right",
+        "segments": [
+          {
+            "type": "exit",
+            "style": "plain",
+            "foreground": "#b8ff75",
+            "foreground_templates": [
+              "{{ if gt .Code 0 }}#E06C75{{ end }}"
+            ],
+            "template": " x{{ .Meaning }}"
+          },
+          {
+            "foreground": "#b8ff75",
+            "foreground_templates": [
+              "{{ if gt .Code 0 }}#E06C75{{ end }}"
+            ],
+            "properties": {
+              "style": "roundrock",
+              "always_enabled": true
+            },
+            "style": "diamond",
+            "template": " {{ .FormattedMs }} ",
+            "type": "executiontime"
+          }
+        ],
+        "type": "prompt"
+      },
+      {
+        "alignment": "left",
+        "newline": true,
+        "segments": [
+          {
+            "foreground": "#61AFEF",
+            "properties": {
+              "style": "full"
+            },
+            "style": "plain",
+            "template": "\ue5ff {{ .Path }}",
+            "type": "path"
+          }
+        ],
+        "type": "prompt"
+      },
+      {
+        "alignment": "left",
+        "newline": true,
+        "segments": [
+          {
+            "foreground": "#E06C75",
+            "style": "plain",
+            "template": "\u0021",
+            "type": "root"
+          },
+          {
+            "foreground": "#E06C75",
+            "style": "plain",
+            "template": "\u276f",
+            "type": "text"
+          }
+        ],
+        "type": "prompt"
+      }
+    ],
+    "final_space": true,
+    "version": 2
+  }
diff --git a/themes/free-ukraine.omp.json b/themes/free-ukraine.omp.json
index 726b27a7..6b79d8c3 100644
--- a/themes/free-ukraine.omp.json
+++ b/themes/free-ukraine.omp.json
@@ -52,7 +52,7 @@
             "fetch_upstream_icon": true
           },
           "style": "powerline",
-          "template": " \uf1d3  {{ .HEAD }} {{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}}\uf692 {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} \uf1bb {{ .WorktreeCount }}{{ end }} ",
+          "template": " \uf1d3  {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}}\uf692 {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} \uf1bb {{ .WorktreeCount }}{{ end }} ",
           "type": "git"
         },
         {
diff --git a/themes/gruvbox.omp.json b/themes/gruvbox.omp.json
index cafe2627..9013c925 100644
--- a/themes/gruvbox.omp.json
+++ b/themes/gruvbox.omp.json
@@ -1,135 +1,135 @@
-{
-  "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
-  "blocks": [
-    {
-      "alignment": "left",
-      "segments": [
-        {
-          "background": "#3A3A3A",
-          "foreground": "#ffffff",
-          "style": "powerline",
-          "template": "{{ if .WSL }}WSL at{{ end }} {{.Icon}} ",
-          "type": "os"
-        },
-        {
-          "background": "#458588",
-          "foreground": "#282828",
-          "powerline_symbol": "\ue0b0",
-          "properties": {
-            "style": "full"
-          },
-          "style": "powerline",
-          "template": " {{ .Path }} ",
-          "type": "path"
-        },
-        {
-          "background": "#98971A",
-          "background_templates": [
-            "{{ if or (.Working.Changed) (.Staging.Changed) }}#FF9248{{ end }}",
-            "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ff4500{{ end }}",
-            "{{ if gt .Ahead 0 }}#B388FF{{ end }}",
-            "{{ if gt .Behind 0 }}#B388FF{{ end }}"
-          ],
-          "foreground": "#282828",
-          "leading_diamond": "\ue0b6",
-          "powerline_symbol": "\ue0b0",
-          "properties": {
-            "branch_max_length": 25,
-            "fetch_stash_count": true,
-            "fetch_status": true,
-            "branch_icon": "\uE0A0 ",
-            "branch_identical_icon": "\u25CF"
-          },
-          "style": "powerline",
-          "template": " {{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
-          "trailing_diamond": "\ue0b4",
-          "type": "git"
-        },
-        {
-          "background": "#8ED1F7",
-          "foreground": "#111111",
-          "powerline_symbol": "\ue0b0",
-          "properties": {
-            "fetch_version": true
-          },
-          "style": "powerline",
-          "template": " \ue626 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
-          "type": "go"
-        },
-        {
-          "background": "#4063D8",
-          "foreground": "#111111",
-          "powerline_symbol": "\ue0b0",
-          "properties": {
-            "fetch_version": true
-          },
-          "style": "powerline",
-          "template": " \ue624 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
-          "type": "julia"
-        },
-        {
-          "background": "#FFDE57",
-          "foreground": "#111111",
-          "powerline_symbol": "\ue0b0",
-          "properties": {
-            "display_mode": "files",
-            "fetch_virtual_env": false
-          },
-          "style": "powerline",
-          "template": " \ue235 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
-          "type": "python"
-        },
-        {
-          "background": "#AE1401",
-          "foreground": "#ffffff",
-          "powerline_symbol": "\ue0b0",
-          "properties": {
-            "display_mode": "files",
-            "fetch_version": true
-          },
-          "style": "powerline",
-          "template": " \ue791 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
-          "type": "ruby"
-        },
-        {
-          "background": "#FEAC19",
-          "foreground": "#ffffff",
-          "powerline_symbol": "\ue0b0",
-          "properties": {
-            "display_mode": "files",
-            "fetch_version": false
-          },
-          "style": "powerline",
-          "template": " \uf0e7{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
-          "type": "azfunc"
-        },
-        {
-          "background_templates": [
-            "{{if contains \"default\" .Profile}}#FFA400{{end}}",
-            "{{if contains \"jan\" .Profile}}#f1184c{{end}}"
-          ],
-          "foreground": "#ffffff",
-          "powerline_symbol": "\ue0b0",
-          "properties": {
-            "display_default": false
-          },
-          "style": "powerline",
-          "template": " \ue7ad {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} ",
-          "type": "aws"
-        },
-        {
-          "background": "#ffff66",
-          "foreground": "#111111",
-          "powerline_symbol": "\ue0b0",
-          "style": "powerline",
-          "template": " \uf0ad ",
-          "type": "root"
-        }
-      ],
-      "type": "prompt"
-    }
-  ],
-  "console_title_template": "{{ .Folder }}",
-  "final_space": true,
-  "version": 2
-}
+{
+  "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
+  "blocks": [
+    {
+      "alignment": "left",
+      "segments": [
+        {
+          "background": "#3A3A3A",
+          "foreground": "#ffffff",
+          "style": "powerline",
+          "template": "{{ if .WSL }}WSL at{{ end }} {{.Icon}} ",
+          "type": "os"
+        },
+        {
+          "background": "#458588",
+          "foreground": "#282828",
+          "powerline_symbol": "\ue0b0",
+          "properties": {
+            "style": "full"
+          },
+          "style": "powerline",
+          "template": " {{ .Path }} ",
+          "type": "path"
+        },
+        {
+          "background": "#98971A",
+          "background_templates": [
+            "{{ if or (.Working.Changed) (.Staging.Changed) }}#FF9248{{ end }}",
+            "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ff4500{{ end }}",
+            "{{ if gt .Ahead 0 }}#B388FF{{ end }}",
+            "{{ if gt .Behind 0 }}#B388FF{{ end }}"
+          ],
+          "foreground": "#282828",
+          "leading_diamond": "\ue0b6",
+          "powerline_symbol": "\ue0b0",
+          "properties": {
+            "branch_max_length": 25,
+            "fetch_stash_count": true,
+            "fetch_status": true,
+            "branch_icon": "\uE0A0 ",
+            "branch_identical_icon": "\u25CF"
+          },
+          "style": "powerline",
+          "template": " {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
+          "trailing_diamond": "\ue0b4",
+          "type": "git"
+        },
+        {
+          "background": "#8ED1F7",
+          "foreground": "#111111",
+          "powerline_symbol": "\ue0b0",
+          "properties": {
+            "fetch_version": true
+          },
+          "style": "powerline",
+          "template": " \ue626 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
+          "type": "go"
+        },
+        {
+          "background": "#4063D8",
+          "foreground": "#111111",
+          "powerline_symbol": "\ue0b0",
+          "properties": {
+            "fetch_version": true
+          },
+          "style": "powerline",
+          "template": " \ue624 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
+          "type": "julia"
+        },
+        {
+          "background": "#FFDE57",
+          "foreground": "#111111",
+          "powerline_symbol": "\ue0b0",
+          "properties": {
+            "display_mode": "files",
+            "fetch_virtual_env": false
+          },
+          "style": "powerline",
+          "template": " \ue235 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
+          "type": "python"
+        },
+        {
+          "background": "#AE1401",
+          "foreground": "#ffffff",
+          "powerline_symbol": "\ue0b0",
+          "properties": {
+            "display_mode": "files",
+            "fetch_version": true
+          },
+          "style": "powerline",
+          "template": " \ue791 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
+          "type": "ruby"
+        },
+        {
+          "background": "#FEAC19",
+          "foreground": "#ffffff",
+          "powerline_symbol": "\ue0b0",
+          "properties": {
+            "display_mode": "files",
+            "fetch_version": false
+          },
+          "style": "powerline",
+          "template": " \uf0e7{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
+          "type": "azfunc"
+        },
+        {
+          "background_templates": [
+            "{{if contains \"default\" .Profile}}#FFA400{{end}}",
+            "{{if contains \"jan\" .Profile}}#f1184c{{end}}"
+          ],
+          "foreground": "#ffffff",
+          "powerline_symbol": "\ue0b0",
+          "properties": {
+            "display_default": false
+          },
+          "style": "powerline",
+          "template": " \ue7ad {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} ",
+          "type": "aws"
+        },
+        {
+          "background": "#ffff66",
+          "foreground": "#111111",
+          "powerline_symbol": "\ue0b0",
+          "style": "powerline",
+          "template": " \uf0ad ",
+          "type": "root"
+        }
+      ],
+      "type": "prompt"
+    }
+  ],
+  "console_title_template": "{{ .Folder }}",
+  "final_space": true,
+  "version": 2
+}
diff --git a/themes/if_tea.omp.json b/themes/if_tea.omp.json
index 781bd3ce..a1f9247a 100644
--- a/themes/if_tea.omp.json
+++ b/themes/if_tea.omp.json
@@ -79,7 +79,7 @@
             "fetch_worktree_count": true
           },
           "style": "diamond",
-          "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ 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 }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
           "trailing_diamond": "\ue0b0",
           "type": "git"
         }
diff --git a/themes/jandedobbeleer.omp.json b/themes/jandedobbeleer.omp.json
index d82e3488..f8277b19 100644
--- a/themes/jandedobbeleer.omp.json
+++ b/themes/jandedobbeleer.omp.json
@@ -44,7 +44,7 @@
             "fetch_upstream_icon": true
           },
           "style": "powerline",
-          "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ 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 }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
           "trailing_diamond": "\ue0b4",
           "type": "git"
         },
diff --git a/themes/jv_sitecorian.omp.json b/themes/jv_sitecorian.omp.json
index 888f2189..b85faa86 100644
--- a/themes/jv_sitecorian.omp.json
+++ b/themes/jv_sitecorian.omp.json
@@ -51,7 +51,7 @@
             "fetch_upstream_icon": true
           },
           "style": "powerline",
-          "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ 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 }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
           "type": "git"
         },
         {
diff --git a/themes/kushal.omp.json b/themes/kushal.omp.json
index 36aca341..8580762d 100644
--- a/themes/kushal.omp.json
+++ b/themes/kushal.omp.json
@@ -72,7 +72,7 @@
             "fetch_worktree_count": true
           },
           "style": "powerline",
-          "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<#CAEBE1> \uf046 {{ .Staging.String }}</>{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ 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 }}<#CAEBE1> \uf046 {{ .Staging.String }}</>{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
           "type": "git"
         }
       ],
diff --git a/themes/larserikfinholt.omp.json b/themes/larserikfinholt.omp.json
index 562bbb13..e39d56a6 100644
--- a/themes/larserikfinholt.omp.json
+++ b/themes/larserikfinholt.omp.json
@@ -43,7 +43,7 @@
             "fetch_upstream_icon": true
           },
           "style": "powerline",
-          "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ 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 }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
           "type": "git"
         },
         {
diff --git a/themes/marcduiker.omp.json b/themes/marcduiker.omp.json
index 85c13dc3..2de40e78 100644
--- a/themes/marcduiker.omp.json
+++ b/themes/marcduiker.omp.json
@@ -33,7 +33,7 @@
             "fetch_upstream_icon": true
           },
           "style": "powerline",
-          "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
+          "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
           "type": "git"
         },
         {
diff --git a/themes/markbull.omp.json b/themes/markbull.omp.json
index 5014b51f..6eeee9b4 100644
--- a/themes/markbull.omp.json
+++ b/themes/markbull.omp.json
@@ -68,7 +68,7 @@
             "tag_icon": "\uf412 "
           },
           "style": "powerline",
-          "template": " {{ if( .UpstreamIcon ) }}{{ url .UpstreamIcon .UpstreamURL }} {{ end }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} <#ed1941>\uf044 {{.Working.String}}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} <#225a1f>\uf046 {{.Staging.String}}</>{{ end }}{{ if gt .StashCount 0 }}  \uf692 {{.StashCount}}{{ end }}{{ if gt .WorktreeCount 0 }}{{if .IsWorkTree}}<#1d953f>{{ end }}  \uf1bb {{if .IsWorkTree}}</>{{ end }}{{.WorktreeCount}}{{ end }} ",
+          "template": " {{ if( .UpstreamIcon ) }}{{ url .UpstreamIcon .UpstreamURL }} {{ end }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} <#ed1941>\uf044 {{.Working.String}}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} <#225a1f>\uf046 {{.Staging.String}}</>{{ end }}{{ if gt .StashCount 0 }}  \uf692 {{.StashCount}}{{ end }}{{ if gt .WorktreeCount 0 }}{{if .IsWorkTree}}<#1d953f>{{ end }}  \uf1bb {{if .IsWorkTree}}</>{{ end }}{{.WorktreeCount}}{{ end }} ",
           "type": "git"
         },
         {
diff --git a/themes/mojada.omp.json b/themes/mojada.omp.json
index 3682eb8f..2668c250 100644
--- a/themes/mojada.omp.json
+++ b/themes/mojada.omp.json
@@ -73,7 +73,7 @@
             "fetch_upstream_icon": true
           },
           "style": "powerline",
-          "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
+          "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
           "type": "git"
         },
         {
diff --git a/themes/multiverse-neon.omp.json b/themes/multiverse-neon.omp.json
index 937a1961..b80e653a 100644
--- a/themes/multiverse-neon.omp.json
+++ b/themes/multiverse-neon.omp.json
@@ -33,11 +33,11 @@
             "fetch_upstream_icon": true
           },
           "style": "diamond",
-          "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ 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 }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
           "trailing_diamond": "\ue0b4",
           "type": "git"
         },
-       
+
         {
           "foreground": "#C94A16",
           "style": "plain",
@@ -50,7 +50,7 @@
      {
       "alignment": "right",
       "segments": [
-        
+
         {
           "foreground": "#5fb157",
           "properties": {
diff --git a/themes/negligible.omp.json b/themes/negligible.omp.json
index 7495312e..1df4ea64 100644
--- a/themes/negligible.omp.json
+++ b/themes/negligible.omp.json
@@ -25,7 +25,7 @@
             "fetch_status": true
           },
           "style": "plain",
-          "template": ":: {{ .HEAD }}{{ .BranchStatus }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }} ",
+          "template": ":: {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }} ",
           "type": "git"
         }
       ],
diff --git a/themes/night-owl.omp.json b/themes/night-owl.omp.json
index a832a62e..dbf2e6ed 100644
--- a/themes/night-owl.omp.json
+++ b/themes/night-owl.omp.json
@@ -58,7 +58,7 @@
             "fetch_worktree_count": true
           },
           "style": "powerline",
-          "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ 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 }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
           "type": "git"
         },
         {
diff --git a/themes/nordtron.omp.json b/themes/nordtron.omp.json
index a3424a9d..7c4e47f3 100644
--- a/themes/nordtron.omp.json
+++ b/themes/nordtron.omp.json
@@ -18,7 +18,7 @@
             "fetch_upstream_icon": true
           },
           "style": "plain",
-          "template": "<#5e81ac>--[</>{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }}<#8fbcbb> \u25cf </>{{ end }}{{ if .Staging.Changed }}<#88c0d0> \u25cf </>{{ end }}<#5e81ac>]</>",
+          "template": "<#5e81ac>--[</>{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}<#8fbcbb> \u25cf </>{{ end }}{{ if .Staging.Changed }}<#88c0d0> \u25cf </>{{ end }}<#5e81ac>]</>",
           "type": "git"
         },
         {
diff --git a/themes/patriksvensson.omp.json b/themes/patriksvensson.omp.json
index 1bf1e7cc..f722b725 100644
--- a/themes/patriksvensson.omp.json
+++ b/themes/patriksvensson.omp.json
@@ -39,7 +39,7 @@
             "github_icon": "\uf408 "
           },
           "style": "plain",
-          "template": " on {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }}<red> \uf044 {{ .Working.String }}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<yellow> \uf046 {{ .Staging.String }}</>{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }}",
+          "template": " on {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}<red> \uf044 {{ .Working.String }}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<yellow> \uf046 {{ .Staging.String }}</>{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }}",
           "type": "git"
         },
         {
diff --git a/themes/peru.omp.json b/themes/peru.omp.json
index ce7425c1..6433d47b 100644
--- a/themes/peru.omp.json
+++ b/themes/peru.omp.json
@@ -34,7 +34,7 @@
             "fetch_upstream_icon": true
           },
           "style": "plain",
-          "template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ 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 }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
           "type": "git"
         }
       ],
diff --git a/themes/pixelrobots.omp.json b/themes/pixelrobots.omp.json
index fb5c20f5..21b0c998 100644
--- a/themes/pixelrobots.omp.json
+++ b/themes/pixelrobots.omp.json
@@ -113,7 +113,7 @@
             "fetch_upstream_icon": true
           },
           "style": "diamond",
-          "template": "<#ffea00>\ue0b1 </>{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }}<#E84855> \uf044 {{ .Working.String }}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<#2FDA4E> \uf046 {{ .Staging.String }}</>{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
+          "template": "<#ffea00>\ue0b1 </>{{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}<#E84855> \uf044 {{ .Working.String }}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<#2FDA4E> \uf046 {{ .Staging.String }}</>{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
           "type": "git"
         },
         {
diff --git a/themes/poshmon.omp.json b/themes/poshmon.omp.json
index 8b8d84ae..6ff0adcc 100644
--- a/themes/poshmon.omp.json
+++ b/themes/poshmon.omp.json
@@ -43,7 +43,7 @@
             "fetch_upstream_icon": true
           },
           "style": "powerline",
-          "template": " \uf113 {{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
+          "template": " \uf113 {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
           "type": "git"
         }
       ],
diff --git a/themes/powerlevel10k_rainbow.omp.json b/themes/powerlevel10k_rainbow.omp.json
index b8f7ef8f..c6679bee 100644
--- a/themes/powerlevel10k_rainbow.omp.json
+++ b/themes/powerlevel10k_rainbow.omp.json
@@ -41,7 +41,7 @@
             "fetch_upstream_icon": true
           },
           "style": "powerline",
-          "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ 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 }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
           "type": "git"
         }
       ],
diff --git a/themes/pure.omp.json b/themes/pure.omp.json
index 66d69fdf..1d363b4a 100644
--- a/themes/pure.omp.json
+++ b/themes/pure.omp.json
@@ -37,7 +37,7 @@
             "github_icon": ""
           },
           "style": "plain",
-          "template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }}<#FFAFD7>*</>{{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
+          "template": "{{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}<#FFAFD7>*</>{{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
           "type": "git"
         }
       ],
diff --git a/themes/rudolfs-dark.omp.json b/themes/rudolfs-dark.omp.json
index 3951d615..74b48242 100644
--- a/themes/rudolfs-dark.omp.json
+++ b/themes/rudolfs-dark.omp.json
@@ -48,7 +48,7 @@
             "fetch_upstream_icon": true
           },
           "style": "plain",
-          "template": "[ {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ 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 }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ]",
           "type": "git"
         },
         {
diff --git a/themes/rudolfs-light.omp.json b/themes/rudolfs-light.omp.json
index 388328f5..bf351891 100644
--- a/themes/rudolfs-light.omp.json
+++ b/themes/rudolfs-light.omp.json
@@ -38,7 +38,7 @@
             "fetch_upstream_icon": true
           },
           "style": "plain",
-          "template": " [{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }}<#BD6200> \uf044 {{ .Working.String }}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<#053F22> \uf046 {{ .Staging.String }}</>{{ end }}] ",
+          "template": " [{{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}<#BD6200> \uf044 {{ .Working.String }}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<#053F22> \uf046 {{ .Staging.String }}</>{{ end }}] ",
           "type": "git"
         },
         {
diff --git a/themes/schema.json b/themes/schema.json
index 3b69077a..9a6ca702 100644
--- a/themes/schema.json
+++ b/themes/schema.json
@@ -1915,19 +1915,6 @@
             }
           }
         },
-        {
-          "if": {
-            "properties": {
-              "type": {
-                "const": "poshgit"
-              }
-            }
-          },
-          "then": {
-            "title": "Posh-Git Segment",
-            "description": "https://ohmyposh.dev/docs/segments/poshgit"
-          }
-        },
         {
           "if": {
             "properties": {
diff --git a/themes/slim.omp.json b/themes/slim.omp.json
index 78ec9855..cf7005b0 100644
--- a/themes/slim.omp.json
+++ b/themes/slim.omp.json
@@ -70,7 +70,7 @@
             "fetch_upstream_icon": true
           },
           "style": "diamond",
-          "template": "<#7a7a7a>\ue0b1 </>{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }}<#E84855> \uf044 {{ .Working.String }}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<#2FDA4E> \uf046 {{ .Staging.String }}</>{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
+          "template": "<#7a7a7a>\ue0b1 </>{{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}<#E84855> \uf044 {{ .Working.String }}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<#2FDA4E> \uf046 {{ .Staging.String }}</>{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
           "type": "git"
         },
         {
diff --git a/themes/slimfat.omp.json b/themes/slimfat.omp.json
index 835157bc..3b9f1218 100644
--- a/themes/slimfat.omp.json
+++ b/themes/slimfat.omp.json
@@ -68,7 +68,7 @@
             "fetch_upstream_icon": true
           },
           "style": "diamond",
-          "template": "<#7a7a7a>\ue0b1 </>{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }}<#E84855> \uf044 {{ .Working.String }}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<#2FDA4E> \uf046 {{ .Staging.String }}</>{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
+          "template": "<#7a7a7a>\ue0b1 </>{{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}<#E84855> \uf044 {{ .Working.String }}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<#2FDA4E> \uf046 {{ .Staging.String }}</>{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
           "type": "git"
         },
         {
diff --git a/themes/smoothie.omp.json b/themes/smoothie.omp.json
index 7e939b7d..68584104 100644
--- a/themes/smoothie.omp.json
+++ b/themes/smoothie.omp.json
@@ -30,7 +30,7 @@
             "fetch_status": true
           },
           "style": "plain",
-          "template": "\u27e8{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \u2206{{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}\u27e9",
+          "template": "\u27e8{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \u2206{{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}\u27e9",
           "type": "git"
         },
         {
diff --git a/themes/star.omp.json b/themes/star.omp.json
index a7ca1aa5..bc7f0ca6 100644
--- a/themes/star.omp.json
+++ b/themes/star.omp.json
@@ -25,7 +25,7 @@
             "fetch_status": true
           },
           "style": "plain",
-          "template": "<#ffffff>on</> {{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }} ",
+          "template": "<#ffffff>on</> {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }} ",
           "type": "git"
         },
         {
diff --git a/themes/stelbent-compact.minimal.omp.json b/themes/stelbent-compact.minimal.omp.json
index c4e6f9ec..3926e60b 100644
--- a/themes/stelbent-compact.minimal.omp.json
+++ b/themes/stelbent-compact.minimal.omp.json
@@ -39,7 +39,7 @@
             "{{ if gt .Ahead 0 }}#89d1dc{{ end }}",
             "{{ if gt .Behind 0 }}#c5b6ad{{ end }}"
           ],
-          "template": " {{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} \u2502{{ end }}{{ if .Staging.Changed }} {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} {{ .StashCount }}{{ end }} ",
+          "template": " {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} \u2502{{ end }}{{ if .Staging.Changed }} {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} {{ .StashCount }}{{ end }} ",
           "properties": {
             "branch_ahead_icon": "\u2191",
             "branch_behind_icon": "\u2193",
diff --git a/themes/stelbent.minimal.omp.json b/themes/stelbent.minimal.omp.json
index ca37761a..cf16f443 100644
--- a/themes/stelbent.minimal.omp.json
+++ b/themes/stelbent.minimal.omp.json
@@ -75,7 +75,7 @@
             "tag_icon": "\u25b6 "
           },
           "style": "powerline",
-          "template": " {{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} \u2502{{ end }}{{ if .Staging.Changed }} {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} {{ .StashCount }}{{ end }} ",
+          "template": " {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} \u2502{{ end }}{{ if .Staging.Changed }} {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} {{ .StashCount }}{{ end }} ",
           "type": "git"
         },
         {
diff --git a/themes/the-unnamed.omp.json b/themes/the-unnamed.omp.json
index 4f37ab35..3fa1342e 100644
--- a/themes/the-unnamed.omp.json
+++ b/themes/the-unnamed.omp.json
@@ -19,7 +19,7 @@
             "branch_icon": "\ue0a0 "
           },
           "style": "plain",
-          "template": "<#F3EFF5>on</> {{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }} ",
+          "template": "<#F3EFF5>on</> {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }} ",
           "type": "git"
         },
         {
diff --git a/themes/thecyberden.omp.json b/themes/thecyberden.omp.json
index db62f57c..85be9f72 100644
--- a/themes/thecyberden.omp.json
+++ b/themes/thecyberden.omp.json
@@ -40,7 +40,7 @@
             "fetch_upstream_icon": true
           },
           "style": "powerline",
-          "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ 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 }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
           "type": "git"
         },
         {
diff --git a/themes/tokyo.omp.json b/themes/tokyo.omp.json
index fd50c2bb..aac36a01 100644
--- a/themes/tokyo.omp.json
+++ b/themes/tokyo.omp.json
@@ -51,7 +51,7 @@
             "fetch_upstream_icon": true
           },
           "style": "plain",
-          "template": "[<#ffffff>{{ .UpstreamIcon }}</>{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} <#ffffff>\uf044</> {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} <#ffffff>\uf046</> {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} <#ffffff>\uf692</> {{ .StashCount }}{{ end }}]",
+          "template": "[<#ffffff>{{ .UpstreamIcon }}</>{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} <#ffffff>\uf044</> {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} <#ffffff>\uf046</> {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} <#ffffff>\uf692</> {{ .StashCount }}{{ end }}]",
           "type": "git"
         },
         {
diff --git a/themes/unicorn.omp.json b/themes/unicorn.omp.json
index 2e27e141..8a0e3b31 100644
--- a/themes/unicorn.omp.json
+++ b/themes/unicorn.omp.json
@@ -43,7 +43,7 @@
             "fetch_upstream_icon": true
           },
           "style": "powerline",
-          "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ 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 }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
           "type": "git"
         },
         {
diff --git a/themes/velvet.omp.json b/themes/velvet.omp.json
index 8188071b..137b8330 100644
--- a/themes/velvet.omp.json
+++ b/themes/velvet.omp.json
@@ -48,7 +48,7 @@
             "fetch_upstream_icon": true
           },
           "style": "powerline",
-          "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ 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 }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
           "type": "git"
         },
         {
diff --git a/themes/wholespace.json b/themes/wholespace.json
index 69bd4e1f..213b185d 100644
--- a/themes/wholespace.json
+++ b/themes/wholespace.json
@@ -91,7 +91,7 @@
             "fetch_worktree_count": true
           },
           "style": "diamond",
-          "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ 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 }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
           "trailing_diamond": "\ue0b0",
           "type": "git"
         }
diff --git a/website/docs/configuration/example.mdx b/website/docs/configuration/example.mdx
index 7b2180d7..9832fcb5 100644
--- a/website/docs/configuration/example.mdx
+++ b/website/docs/configuration/example.mdx
@@ -76,7 +76,7 @@ import TabItem from "@theme/TabItem"
             "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ffffff{{ end }}"
           ],
           "powerline_symbol": "\ue0b0",
-          "template": " {{ .HEAD }}{{ .BranchStatus }} ",
+          "template": " {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }} ",
           "properties": {
             "branch_max_length": 25,
             "fetch_status": true
@@ -151,7 +151,7 @@ blocks:
     foreground_templates:
     - "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ffffff{{ end }}"
     powerline_symbol: "\ue0b0"
-    template: " {{ .HEAD }}{{ .BranchStatus }} "
+    template: " {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }} "
     properties:
       branch_max_length: 25
       fetch_status: true
@@ -229,7 +229,7 @@ type = "prompt"
   foreground = "#193549"
   foreground_templates = [ "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ffffff{{ end }}" ]
   powerline_symbol = "\ue0b0"
-  template = " {{ .HEAD }}{{ .BranchStatus }} "
+  template = " {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }} "
   style = "powerline"
   type = "git"
 
diff --git a/website/docs/installation/customize.mdx b/website/docs/installation/customize.mdx
index d6400461..0181b380 100644
--- a/website/docs/installation/customize.mdx
+++ b/website/docs/installation/customize.mdx
@@ -12,7 +12,26 @@ and kept up-to-date with Oh My Posh' version every time the shell starts.
 
 To set a new config/theme you need
 to change the `--config` option of the `oh-my-posh init <shell>` line in your `profile` or `.<shell>rc` script
-(see [prompt][prompt]) and point it to the location of a predefined [theme][themes] or custom configuration on your file system.
+(see [prompt][prompt]) and point it to the location of a predefined [theme][themes] or custom configuration.
+
+There are two possible values the `--config` flag can handle:
+
+- a path to a local configuration file
+
+```powershell
+oh-my-posh init pwsh --config 'C:/Users/Posh/jandedobbeleer.omp.json' | Invoke-Expression
+```
+
+- a URL pointing to a remote config
+
+```powershell
+oh-my-posh init pwsh --config 'https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/jandedobbeleer.omp.json' | Invoke-Expression
+```
+
+### Get inspiration
+
+The Windows and homebrew installers also bundle the **predefined configurations** ([themes][themes]). You can use the
+following way to reference them directly. This will keep them up-to-date and compatible with future updates.
 
 <Tabs
   defaultValue="windows"
@@ -24,9 +43,6 @@ to change the `--config` option of the `oh-my-posh init <shell>` line in your `p
 }>
 <TabItem value="windows">
 
-When using the Windows installer (via winget or Store), you can make use of the `POSH_THEMES_PATH` environment variable
-that points to a directory including all [themes][themes] on your file system.
-
 For example, to use the [jandedobbeleer][jandedobbeleer] theme, alter the init line like this (`powershell`):
 
 ```powershell
@@ -46,11 +62,10 @@ eval "$(oh-my-posh init zsh --config $(brew --prefix oh-my-posh)/themes/jandedob
 </TabItem>
 </Tabs>
 
-### Get inspiration
+### Config syntax
 
-The best place to get started is by looking at the [themes][themes], as these are **predefined configurations** to use/alter.
-To change to for example the [jandedobbeleer][jandedobbeleer] theme, alter the Oh My Posh `init` line to the following (assuming you
-downloaded the configuration file to your user's home folder):
+The examples below use a local path to the [jandedobbeleer][jandedobbeleer] theme, adjust the `--config` value
+to reflect your use-case.
 
 <Tabs
   defaultValue="powershell"
@@ -67,7 +82,7 @@ downloaded the configuration file to your user's home folder):
 <TabItem value="powershell">
 
 ```powershell
-oh-my-posh init pwsh --config ~/.jandedobbeleer.omp.json | Invoke-Expression
+oh-my-posh init pwsh --config ~/jandedobbeleer.omp.json | Invoke-Expression
 ```
 
 Once altered, reload your profile for the changes to take effect.
@@ -88,16 +103,21 @@ New-Item -Path $PROFILE -Type File -Force
 <TabItem value="cmd">
 
 ```lua title="oh-my-posh.lua"
-load(io.popen('oh-my-posh init cmd --config ~/.jandedobbeleer.omp.json'):read("*a"))()
+load(io.popen('oh-my-posh init cmd --config C:/Users/Posh/jandedobbeleer.omp.json'):read("*a"))()
 ```
 
+:::caution
+Use the full path to the config file, not the relative path. You can make use of **forward slashes** to
+avoid having to use double backslashes.
+:::
+
 Once altered, restart cmd for the changes to take effect.
 
 </TabItem>
 <TabItem value="zsh">
 
 ```bash
-eval "$(oh-my-posh init zsh --config ~/.jandedobbeleer.omp.json)"
+eval "$(oh-my-posh init zsh --config ~/jandedobbeleer.omp.json)"
 ```
 
 Once altered, reload your profile for the changes to take effect.
@@ -110,7 +130,7 @@ exec zsh
 <TabItem value="bash">
 
 ```bash
-eval "$(oh-my-posh init bash --config ~/.jandedobbeleer.omp.json)"
+eval "$(oh-my-posh init bash --config ~/jandedobbeleer.omp.json)"
 ```
 
 Once altered, reload your profile for the changes to take effect.
@@ -127,7 +147,7 @@ Oh My Posh requires fish v3.4.0 or higher.
 :::
 
 ```bash
-oh-my-posh init fish --config ~/.jandedobbeleer.omp.json | source
+oh-my-posh init fish --config ~/jandedobbeleer.omp.json | source
 ```
 
 Once altered, reload your config for the changes to take effect.
@@ -146,7 +166,7 @@ Oh My Posh requires Nushell v0.60.0 or higher.
 Run the following command:
 
 ```bash
-oh-my-posh init nu --config ~/.jandedobbeleer.omp.json
+oh-my-posh init nu --config ~/jandedobbeleer.omp.json
 ```
 
 it saves the initialization script to `~/.oh-my-posh.nu` by default.
@@ -159,7 +179,7 @@ source ~/.oh-my-posh.nu
 If you want to save the initialization script elsewhere, you should run a command like:
 
 ```bash
-oh-my-posh init nu --config ~/.jandedobbeleer.omp.json --print | save /mylocation/myscript.nu
+oh-my-posh init nu --config ~/jandedobbeleer.omp.json --print | save /mylocation/myscript.nu
 ```
 
 and add the `source` line like:
@@ -176,7 +196,7 @@ To resolve this, you can use the `--strict` flag which tells Oh My Posh to use t
 full path in the initialization. For example:
 
 ```bash
-oh-my-posh init nu --config ~/.jandedobbeleer.omp.json --print --strict | save /mylocation/myscript.nu
+oh-my-posh init nu --config ~/jandedobbeleer.omp.json --print --strict | save /mylocation/myscript.nu
 ```
 
 This way for a new Oh My Posh version that does not update the initialization script, you don't have to recreate a new one.
@@ -192,17 +212,7 @@ Windows user's home folder.
 Inside the WSL, you can find your Windows user's home folder here: `/mnt/c/Users/<WINDOWSUSERNAME>`.
 :::
 
-:::tip remote config
-The `--config` flag can accept either a local filepath or a remotely hosted config file.
-
-For example, the following is a valid `--config` flag:
-
-```
---config 'https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/jandedobbeleer.omp.json'
-```
-:::
-
-### Export the current theme
+### Adjust a theme
 
 Maybe there's a theme you like, but you don't fancy the colors. Or, maybe there's a segment you
 want to tweak/add, or replace some of the icons with a different one. Whatever the case, **read through
@@ -216,6 +226,12 @@ which can be used to tweak and store as your own custom theme.
 oh-my-posh config export --output ~/.mytheme.omp.json
 ```
 
+:::caution
+Be careful not to adjust the theme files in their original location as they're updated together with Oh My Posh
+which will remove your customizations. Always copy, or export them and save the new configuration outside of the
+Oh My Posh internal themes folder.
+:::
+
 ### Read the docs
 
 To fully understand how to customize a theme, read through the documentation in the configuration and segments sections.
diff --git a/website/docs/installation/prompt.mdx b/website/docs/installation/prompt.mdx
index f4aa8706..c1e220fd 100644
--- a/website/docs/installation/prompt.mdx
+++ b/website/docs/installation/prompt.mdx
@@ -76,10 +76,6 @@ your cmd experience. Follow the installation instructions and make sure you sele
 Integrating Oh My Posh with Clink is easy: create a new file called oh-my-posh.lua in your Clink
 scripts directory (run `clink info` inside cmd to find that file's location).
 
-:::caution
-Use the full path to the config file, not the relative path.
-:::
-
 ```lua title="oh-my-posh.lua"
 load(io.popen('oh-my-posh init cmd'):read("*a"))()
 ```
diff --git a/website/docs/segments/git.mdx b/website/docs/segments/git.mdx
index f8746293..0eedbb90 100644
--- a/website/docs/segments/git.mdx
+++ b/website/docs/segments/git.mdx
@@ -17,15 +17,9 @@ Local changes can also be displayed which uses the following syntax for both the
 - `?` untracked
 
 :::tip
-PowerShell offers support for the `posh-git` module for autocompletion, but it is disabled by default.
-To enable this, set `$env:POSH_GIT_ENABLED = $true` in your `$PROFILE`. Be aware this calls `git status`
-twice, so in case you're having a slow repository, it's better to migrate to the [Posh-Git segment][poshgit].
-:::
-
-:::caution
-Starting from version 3.152.0, `fetch_status` is disabled by default.
-It improves performance but reduces the quantity of information. Don't forget to enable it in your theme if needed.
-An alternative is to use the [Posh-Git segment][poshgit].
+PowerShell offers support for the [posh-git][poshgit] module for autocompletion, but it is disabled by default.
+To enable this, set `$env:POSH_GIT_ENABLED = $true` in your `$PROFILE`. This will also make use of the
+[posh-git][poshgit] output rather than do additional work to get the git status.
 :::
 
 ## Sample Configuration
@@ -43,7 +37,7 @@ An alternative is to use the [Posh-Git segment][poshgit].
     "{{ if gt .Ahead 0 }}#B388FF{{ end }}",
     "{{ if gt .Behind 0 }}#B388FB{{ end }}"
   ],
-  "template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ 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 }} \uF046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}",
   "properties": {
     "fetch_status": true,
     "fetch_stash_count": true,
@@ -108,7 +102,7 @@ instead of the repo path.
 :::note default template
 
 ``` template
-{{ .HEAD }} {{ .BranchStatus }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}} \uF692 {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} \uf1bb {{ .WorktreeCount }}{{ end }}
+{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}} \uF692 {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} \uf1bb {{ .WorktreeCount }}{{ end }}
 ```
 
 :::
diff --git a/website/docs/segments/posh-git.mdx b/website/docs/segments/posh-git.mdx
deleted file mode 100644
index c5148c14..00000000
--- a/website/docs/segments/posh-git.mdx
+++ /dev/null
@@ -1,43 +0,0 @@
----
-id: poshgit
-title: Posh-Git
-sidebar_label: Git (posh-git)
----
-
-## What
-
-Display the [posh-git][posh-git] prompt.
-
-:::caution
-This segment only works within PowerShell and requires the posh-git module to be installed and imported
-as well as `$env:POSH_GIT_ENABLED = $true` added to your `$PROFILE`.
-:::
-
-## Sample Configuration
-
-```json
-{
-  "type": "poshgit",
-  "style": "powerline",
-  "powerline_symbol": "\uE0B0",
-  "foreground": "#ffffff",
-  "background": "#0077c2"
-}
-```
-
-## Template ([info][templates])
-
-:::note default template
-
-``` template
-{{ .Status }}
-```
-
-:::
-
-### Properties
-
-- `.Status`: `string` - the status reported from posh-git
-
-[posh-git]: https://github.com/dahlbyk/posh-git
-[templates]: /docs/configuration/templates
diff --git a/website/sidebars.js b/website/sidebars.js
index ae9f0183..0dba5cfe 100644
--- a/website/sidebars.js
+++ b/website/sidebars.js
@@ -71,7 +71,6 @@ module.exports = {
         "segments/fossil",
         "segments/gcp",
         "segments/git",
-        "segments/poshgit",
         "segments/golang",
         "segments/haskell",
         "segments/ipify",


Test patch:
diff --git a/src/engine/migrate_test.go b/src/engine/migrate_test.go
index 0cd90db6..df4dbae3 100644
--- a/src/engine/migrate_test.go
+++ b/src/engine/migrate_test.go
@@ -195,7 +195,7 @@ func TestSegmentTemplateMigration(t *testing.T) {
 	}{
 		{
 			Case:     "GIT",
-			Expected: " {{ .HEAD }} {{ .BranchStatus }}{{ if .Working.Changed }} working {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} and{{ end }}{{ if .Staging.Changed }} staged {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}} stash {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} worktree {{ .WorktreeCount }}{{ end }} ", //nolint: lll
+			Expected: " {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} working {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} and{{ end }}{{ if .Staging.Changed }} staged {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}} stash {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} worktree {{ .WorktreeCount }}{{ end }} ", //nolint: lll
 			Type:     GIT,
 			Props: properties.Map{
 				"local_working_icon":    " working ",
@@ -207,7 +207,7 @@ func TestSegmentTemplateMigration(t *testing.T) {
 		},
 		{
 			Case:     "GIT - Staging and Working Color",
-			Expected: " {{ .HEAD }} {{ .BranchStatus }}{{ if .Working.Changed }} working <#123456>{{ .Working.String }}</>{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} and{{ end }}{{ if .Staging.Changed }} staged <#123456>{{ .Staging.String }}</>{{ end }}{{ if gt .StashCount 0}} stash {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} worktree {{ .WorktreeCount }}{{ end }} ", //nolint: lll
+			Expected: " {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} working <#123456>{{ .Working.String }}</>{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} and{{ end }}{{ if .Staging.Changed }} staged <#123456>{{ .Staging.String }}</>{{ end }}{{ if gt .StashCount 0}} stash {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} worktree {{ .WorktreeCount }}{{ end }} ", //nolint: lll
 			Type:     GIT,
 			Props: properties.Map{
 				"local_working_icon":    " working ",
diff --git a/src/segments/git_test.go b/src/segments/git_test.go
index fb0107c8..0fcdb504 100644
--- a/src/segments/git_test.go
+++ b/src/segments/git_test.go
@@ -48,6 +48,7 @@ func TestEnabledInWorkingDirectory(t *testing.T) {
 	env.On("HasParentFilePath", ".git").Return(fileInfo, nil)
 	env.On("PathSeparator").Return("/")
 	env.On("Home").Return("/Users/posh")
+	env.On("Getenv", poshGitEnv).Return("")
 	g := &Git{
 		scm: scm{
 			env:   env,
@@ -564,11 +565,11 @@ func TestGetBranchStatus(t *testing.T) {
 		Upstream     string
 		UpstreamGone bool
 	}{
-		{Case: "Equal with remote", Expected: " equal", Upstream: branchName},
-		{Case: "Ahead", Expected: " up2", Ahead: 2},
-		{Case: "Behind", Expected: " down8", Behind: 8},
-		{Case: "Behind and ahead", Expected: " up7 down8", Behind: 8, Ahead: 7},
-		{Case: "Gone", Expected: " gone", Upstream: branchName, UpstreamGone: true},
+		{Case: "Equal with remote", Expected: "equal", Upstream: branchName},
+		{Case: "Ahead", Expected: "up2", Ahead: 2},
+		{Case: "Behind", Expected: "down8", Behind: 8},
+		{Case: "Behind and ahead", Expected: "up7 down8", Behind: 8, Ahead: 7},
+		{Case: "Gone", Expected: "gone", Upstream: branchName, UpstreamGone: true},
 		{Case: "No remote", Expected: "", Upstream: ""},
 		{Case: "Default (bug)", Expected: "", Behind: -8, Upstream: "wonky"},
 	}
diff --git a/src/segments/posh_git_test.go b/src/segments/posh_git_test.go
index 8cb96478..fee78e89 100644
--- a/src/segments/posh_git_test.go
+++ b/src/segments/posh_git_test.go
@@ -1,6 +1,7 @@
 package segments
 
 import (
+	"oh-my-posh/environment"
 	"oh-my-posh/mock"
 	"oh-my-posh/properties"
 	"testing"
@@ -10,26 +11,229 @@ import (
 
 func TestPoshGitSegment(t *testing.T) {
 	cases := []struct {
-		Case          string
-		PoshGitPrompt string
-		Expected      string
-		Enabled       bool
+		Case              string
+		PoshGitJSON       string
+		FetchUpstreamIcon bool
+		Template          string
+		ExpectedString    string
+		ExpectedEnabled   bool
 	}{
-		{Case: "regular prompt", PoshGitPrompt: "my prompt", Expected: "my prompt", Enabled: true},
-		{Case: "prompt with spaces", PoshGitPrompt: "   my prompt", Expected: "my prompt", Enabled: true},
-		{Case: "no prompt", PoshGitPrompt: "", Enabled: false},
+		{
+			Case:            "no status",
+			PoshGitJSON:     "",
+			ExpectedString:  "my prompt",
+			ExpectedEnabled: false,
+		},
+		{
+			Case:            "invalid data",
+			PoshGitJSON:     "{",
+			ExpectedString:  "my prompt",
+			ExpectedEnabled: false,
+		},
+		{
+			Case: "Changes in Working",
+			PoshGitJSON: `
+			{
+				"RepoName": "oh-my-posh",
+				"HasIndex": false,
+				"GitDir": "/Users/bill/Code/oh-my-posh/.git",
+				"Upstream": "origin/posh-git-json",
+				"UpstreamGone": false,
+				"HasUntracked": false,
+				"AheadBy": 0,
+				"StashCount": 0,
+				"HasWorking": true,
+				"BehindBy": 0,
+				"Index": {
+					"value": [],
+					"Added": [],
+					"Modified": [],
+					"Deleted": [],
+					"Unmerged": []
+				},
+				"Working": {
+					"value": [
+						"../src/segments/git_test.go",
+						"../src/segments/posh_git_test.go"
+					],
+					"Added": [],
+					"Modified": [
+						"../src/segments/git_test.go",
+						"../src/segments/posh_git_test.go"
+					],
+					"Deleted": [],
+					"Unmerged": []
+				},
+				"Branch": "posh-git-json"
+			}
+			`,
+			ExpectedString:  "\ue0a0posh-git-json ≡ \uf044 ~2",
+			ExpectedEnabled: true,
+		},
+		{
+			Case: "Changes in Working and Staging, branch ahead an behind",
+			PoshGitJSON: `
+			{
+				"RepoName": "oh-my-posh",
+				"HasIndex": false,
+				"GitDir": "/Users/bill/Code/oh-my-posh/.git",
+				"Upstream": "origin/posh-git-json",
+				"UpstreamGone": false,
+				"HasUntracked": false,
+				"AheadBy": 1,
+				"StashCount": 2,
+				"HasWorking": true,
+				"BehindBy": 1,
+				"Index": {
+					"value": [
+						"../src/segments/git_test.go",
+						"../src/segments/posh_git_test.go"
+					],
+					"Added": [],
+					"Deleted": [
+					"../src/segments/git_test.go",
+					"../src/segments/posh_git_test.go"
+					],
+					"Modified": [],
+					"Unmerged": []
+				},
+				"Working": {
+					"value": [
+						"../src/segments/git_test.go",
+						"../src/segments/posh_git_test.go"
+					],
+					"Added": [],
+					"Modified": [
+						"../src/segments/git_test.go",
+						"../src/segments/posh_git_test.go"
+					],
+					"Deleted": [],
+					"Unmerged": []
+				},
+				"Branch": "posh-git-json"
+			}
+			`,
+			ExpectedString:  "\ue0a0posh-git-json ↑1 ↓1 \uf044 ~2 | \uf046 -2 \uf692 2",
+			ExpectedEnabled: true,
+		},
+		{
+			Case: "Clean branch, no upstream and stash count",
+			PoshGitJSON: `
+			{
+				"RepoName": "oh-my-posh",
+				"GitDir": "/Users/bill/Code/oh-my-posh/.git",
+				"StashCount": 2,
+				"Index": {
+					"value": [],
+					"Added": [],
+					"Modified": [],
+					"Deleted": [],
+					"Unmerged": []
+				},
+				"Working": {
+					"value": [],
+					"Added": [],
+					"Modified": [],
+					"Deleted": [],
+					"Unmerged": []
+				},
+				"Branch": "posh-git-json"
+			}
+			`,
+			ExpectedString:  "\ue0a0posh-git-json ≢ \uf692 2",
+			ExpectedEnabled: true,
+		},
+		{
+			Case: "No working data",
+			PoshGitJSON: `
+			{
+				"RepoName": "oh-my-posh",
+				"GitDir": "/Users/bill/Code/oh-my-posh/.git",
+				"StashCount": 2,
+				"Index": {
+					"value": [],
+					"Added": [],
+					"Modified": [],
+					"Deleted": [],
+					"Unmerged": []
+				},
+				"Branch": "posh-git-json"
+			}
+			`,
+			ExpectedString:  "\ue0a0posh-git-json ≢ \uf692 2",
+			ExpectedEnabled: true,
+		},
+		{
+			Case:     "Fetch upstream icon (GitHub)",
+			Template: "{{ .UpstreamIcon }}",
+			PoshGitJSON: `
+			{
+				"RepoName": "oh-my-posh",
+				"GitDir": "/Users/bill/Code/oh-my-posh/.git",
+				"Branch": "\ue0a0posh-git-json",
+				"Upstream": "origin/posh-git-json"
+			}
+			`,
+			ExpectedString:    "\uf408",
+			FetchUpstreamIcon: true,
+			ExpectedEnabled:   true,
+		},
 	}
 
 	for _, tc := range cases {
 		env := new(mock.MockedEnvironment)
-		env.On("Getenv", poshGitEnv).Return(tc.PoshGitPrompt)
-		p := &PoshGit{
-			env:   env,
-			props: &properties.Map{},
+		env.On("Getenv", poshGitEnv).Return(tc.PoshGitJSON)
+		env.On("Home").Return("/Users/bill")
+		env.On("GOOS").Return(environment.LINUX)
+		env.On("RunCommand", "git", []string{"-C", "", "--no-optional-locks", "-c", "core.quotepath=false",
+			"-c", "color.status=false", "remote", "get-url", "origin"}).Return("github.com/cli", nil)
+		g := &Git{
+			scm: scm{
+				env: env,
+				props: &properties.Map{
+					FetchUpstreamIcon: tc.FetchUpstreamIcon,
+				},
+			},
 		}
-		assert.Equal(t, tc.Enabled, p.Enabled(), tc.Case)
-		if tc.Enabled {
-			assert.Equal(t, tc.Expected, renderTemplate(env, p.Template(), p), tc.Case)
+		if len(tc.Template) == 0 {
+			tc.Template = g.Template()
 		}
+		assert.Equal(t, tc.ExpectedEnabled, g.hasPoshGitStatus(), tc.Case)
+		if tc.ExpectedEnabled {
+			assert.Equal(t, tc.ExpectedString, renderTemplate(env, tc.Template, g), tc.Case)
+		}
+	}
+}
+
+func TestParsePoshGitHEAD(t *testing.T) {
+	cases := []struct {
+		Case           string
+		HEAD           string
+		ExpectedString string
+	}{
+		{
+			Case:           "branch",
+			HEAD:           "main",
+			ExpectedString: "\ue0a0main",
+		},
+		{
+			Case:           "tag",
+			HEAD:           "(tag)",
+			ExpectedString: "\uf412tag",
+		},
+		{
+			Case:           "commit",
+			HEAD:           "(commit...)",
+			ExpectedString: "\uf417commit",
+		},
+	}
+
+	for _, tc := range cases {
+		g := &Git{
+			scm: scm{
+				props: &properties.Map{},
+			},
+		}
+		assert.Equal(t, tc.ExpectedString, g.parsePoshGitHEAD(tc.HEAD), tc.Case)
 	}
 }
diff --git a/src/test/jandedobbeleer-palette.omp.json b/src/test/jandedobbeleer-palette.omp.json
index 7031e453..518766ee 100644
--- a/src/test/jandedobbeleer-palette.omp.json
+++ b/src/test/jandedobbeleer-palette.omp.json
@@ -44,7 +44,7 @@
             "fetch_upstream_icon": true
           },
           "style": "powerline",
-          "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ 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 }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
           "trailing_diamond": "\ue0b4",
           "type": "git"
         },
diff --git a/src/test/jandedobbeleer.omp.json b/src/test/jandedobbeleer.omp.json
index d82e3488..f8277b19 100644
--- a/src/test/jandedobbeleer.omp.json
+++ b/src/test/jandedobbeleer.omp.json
@@ -44,7 +44,7 @@
             "fetch_upstream_icon": true
           },
           "style": "powerline",
-          "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ 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 }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
           "trailing_diamond": "\ue0b4",
           "type": "git"
         },