mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-15 20:17:50 +08:00
38 lines
716 B
Go
38 lines
716 B
Go
package highlight
|
|
|
|
import "src.elv.sh/pkg/ui"
|
|
|
|
var stylingFor = map[string]ui.Styling{
|
|
barewordRegion: nil,
|
|
singleQuotedRegion: ui.FgYellow,
|
|
doubleQuotedRegion: ui.FgYellow,
|
|
variableRegion: ui.FgMagenta,
|
|
wildcardRegion: nil,
|
|
tildeRegion: nil,
|
|
|
|
commentRegion: ui.FgCyan,
|
|
|
|
">": ui.FgGreen,
|
|
">>": ui.FgGreen,
|
|
"<": ui.FgGreen,
|
|
"?>": ui.FgGreen,
|
|
"|": ui.FgGreen,
|
|
"?(": ui.Bold,
|
|
"(": ui.Bold,
|
|
")": ui.Bold,
|
|
"[": ui.Bold,
|
|
"]": ui.Bold,
|
|
"{": ui.Bold,
|
|
"}": ui.Bold,
|
|
"&": ui.Bold,
|
|
|
|
commandRegion: ui.FgGreen,
|
|
keywordRegion: ui.FgYellow,
|
|
errorRegion: ui.Stylings(ui.FgBrightWhite, ui.BgRed),
|
|
}
|
|
|
|
var (
|
|
stylingForGoodCommand = ui.FgGreen
|
|
stylingForBadCommand = ui.FgRed
|
|
)
|