Skip to content

Commit a5a25c1

Browse files
committed
Document tui functions
1 parent 318e00b commit a5a25c1

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

goal.go

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -926,6 +926,32 @@ func GoalKeywordsHelp() map[string]string {
926926
`time[cmd;t;fmt] time command with time t in given format`,
927927
`time[cmd;t;fmt;loc] time command with time t in given format and location`,
928928
}, "\n")
929+
tuiColor := strings.Join([]string{
930+
`tui.color s Color string accepted by lipgloss.Color`,
931+
}, "\n")
932+
tuiRender := strings.Join([]string{
933+
`tui.render style s Return s marked up according to style (see tui.style)`,
934+
}, "\n")
935+
tuiStyle := strings.Join([]string{
936+
`tui.style d Return a style based on entries in d:
937+
- Align (floats or one of "t", "r", "b", "l", or "c")
938+
- Background (tui.color)
939+
- Blink (bool)
940+
- Bold (bool)
941+
- Border (list of name + top, right, bottom, left bools)
942+
- BorderBackground (tui.color)
943+
- BorderForeground (tui.color)
944+
- Faint (bool)
945+
- Foreground (tui.color)
946+
- Height (int)
947+
- Italic (bool)
948+
- Margin (top, right, bottom, left ints)
949+
- Padding (top, right, bottom, left ints)
950+
- Reverse (bool)
951+
- Strikethrough (bool)
952+
- Underline (bool)
953+
- Width (int)`,
954+
}, "\n")
929955
uc := `uc x upper/ceil uc 1.5 → 2.0 uc"abπ" → "ABΠ"`
930956
utf8 := strings.Join([]string{
931957
`utf8 s is UTF-8 utf8 "aπc" → 1 utf8 "a\xff" → 0`,
@@ -1054,6 +1080,9 @@ func GoalKeywordsHelp() map[string]string {
10541080
"stat": stat,
10551081
"sub": sub,
10561082
"time": time,
1083+
"tui.color": tuiColor,
1084+
"tui.render": tuiRender,
1085+
"tui.style": tuiStyle,
10571086
"uc": uc,
10581087
"utf8": utf8,
10591088
}

0 commit comments

Comments
 (0)