Skip to content

Commit

Permalink
git: color config style
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed May 8, 2022
1 parent 6a9f719 commit c167cac
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions pkg/actions/tools/git/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"strings"

"github.com/rsteube/carapace"
"github.com/rsteube/carapace/pkg/style"
)

func ActionConfigs() carapace.Action {
Expand All @@ -22,11 +23,27 @@ func ActionConfigs() carapace.Action {
}

func ActionColors() carapace.Action {
return carapace.ActionValues("normal", "black", "red", "green", "yellow", "blue", "magenta", "cyan", "white")
return carapace.ActionStyledValues(
"normal", style.Default,
"black", style.Black,
"red", style.Red,
"green", style.Green,
"yellow", style.Yellow,
"blue", style.Blue,
"magenta", style.Magenta,
"cyan", style.Cyan,
"white", style.White,
)
}

func ActionTextAttributes() carapace.Action {
return carapace.ActionValues("bold", "dim", "ul", "blink", "reverse")
return carapace.ActionStyledValues(
"bold", style.Bold,
"dim", style.Dim,
"ul", style.Underlined,
"blink", style.Blink,
"reverse", style.Default,
)
}

func ActionColorConfigs() carapace.Action {
Expand Down

0 comments on commit c167cac

Please sign in to comment.