Skip to content

Commit

Permalink
Document tui functions
Browse files Browse the repository at this point in the history
  • Loading branch information
semperos committed Sep 2, 2024
1 parent 318e00b commit a5a25c1
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions goal.go
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,32 @@ func GoalKeywordsHelp() map[string]string {
`time[cmd;t;fmt] time command with time t in given format`,
`time[cmd;t;fmt;loc] time command with time t in given format and location`,
}, "\n")
tuiColor := strings.Join([]string{
`tui.color s Color string accepted by lipgloss.Color`,
}, "\n")
tuiRender := strings.Join([]string{
`tui.render style s Return s marked up according to style (see tui.style)`,
}, "\n")
tuiStyle := strings.Join([]string{
`tui.style d Return a style based on entries in d:
- Align (floats or one of "t", "r", "b", "l", or "c")
- Background (tui.color)
- Blink (bool)
- Bold (bool)
- Border (list of name + top, right, bottom, left bools)
- BorderBackground (tui.color)
- BorderForeground (tui.color)
- Faint (bool)
- Foreground (tui.color)
- Height (int)
- Italic (bool)
- Margin (top, right, bottom, left ints)
- Padding (top, right, bottom, left ints)
- Reverse (bool)
- Strikethrough (bool)
- Underline (bool)
- Width (int)`,
}, "\n")
uc := `uc x upper/ceil uc 1.5 → 2.0 uc"abπ" → "ABΠ"`
utf8 := strings.Join([]string{
`utf8 s is UTF-8 utf8 "aπc" → 1 utf8 "a\xff" → 0`,
Expand Down Expand Up @@ -1054,6 +1080,9 @@ func GoalKeywordsHelp() map[string]string {
"stat": stat,
"sub": sub,
"time": time,
"tui.color": tuiColor,
"tui.render": tuiRender,
"tui.style": tuiStyle,
"uc": uc,
"utf8": utf8,
}
Expand Down

0 comments on commit a5a25c1

Please sign in to comment.