mirror of
https://github.com/arl/gitmux.git
synced 2026-09-10 07:26:18 -04:00
feat: adds option to hide clean flag
This commit is contained in:
parent
595c9fde2f
commit
5f8ad64c2e
|
|
@ -79,3 +79,5 @@ tmux:
|
|||
branch_trim: right
|
||||
# Character indicating whether and where a branch was truncated.
|
||||
ellipsis: …
|
||||
# Hides the clean flag
|
||||
hide_clean: false
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ type options struct {
|
|||
BranchMaxLen int `yaml:"branch_max_len"`
|
||||
BranchTrim direction `yaml:"branch_trim"`
|
||||
Ellipsis string `yaml:"ellipsis"`
|
||||
HideClean bool `yaml:"hide_clean"`
|
||||
}
|
||||
|
||||
// A Formater formats git status to a tmux style string.
|
||||
|
|
@ -256,7 +257,10 @@ func (f *Formater) flags() {
|
|||
fmt.Sprintf("%s%s%d", f.Styles.Stashed, f.Symbols.Stashed, f.st.NumStashed))
|
||||
}
|
||||
|
||||
flags = append(flags, fmt.Sprintf("%s%s", f.Styles.Clean, f.Symbols.Clean))
|
||||
if f.Options.HideClean != true {
|
||||
flags = append(flags, fmt.Sprintf("%s%s", f.Styles.Clean, f.Symbols.Clean))
|
||||
}
|
||||
|
||||
f.clear()
|
||||
f.b.WriteString(strings.Join(flags, " "))
|
||||
return
|
||||
|
|
|
|||
Loading…
Reference in a new issue