1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

Support match colors in labelFormat entry in menuFromCommand prompts

This commit is contained in:
Elwardi
2021-08-07 16:06:36 +01:00
parent 5d1a9639b6
commit b5d8849c06
4 changed files with 29 additions and 20 deletions

View File

@ -27,6 +27,21 @@ var (
AttrUnderline = New().SetUnderline()
AttrBold = New().SetBold()
ColorMap = map[string]struct {
Foreground TextStyle
Background TextStyle
}{
"default": {FgWhite, BgBlack},
"black": {FgBlack, BgBlack},
"red": {FgRed, BgRed},
"green": {FgGreen, BgGreen},
"yellow": {FgYellow, BgYellow},
"blue": {FgBlue, BgBlue},
"magenta": {FgMagenta, BgMagenta},
"cyan": {FgCyan, BgCyan},
"white": {FgWhite, BgWhite},
}
)
func FromBasicFg(fg color.Color) TextStyle {