Skip to content

Commit

Permalink
Merge pull request #366 from kispaljr/main
Browse files Browse the repository at this point in the history
Add "git branch" symbol to gitlite module (if git mode is not "compact")
  • Loading branch information
justjanne authored Feb 9, 2023
2 parents fe0a2a4 + f1f79cc commit d21ba86
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions segment-gitlite.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"fmt"
"strings"

pwl "github.com/justjanne/powerline-go/powerline"
Expand Down Expand Up @@ -32,6 +33,10 @@ func segmentGitLite(p *powerline) []pwl.Segment {
branch = status
}

if p.cfg.GitMode != "compact" && len(p.symbols.RepoBranch) > 0 {
branch = fmt.Sprintf("%s %s", p.symbols.RepoBranch, branch)
}

return []pwl.Segment{{
Name: "git-branch",
Content: branch,
Expand Down

0 comments on commit d21ba86

Please sign in to comment.