docs: add join comment with example

This commit is contained in:
Maas Lalani 2022-07-08 10:23:45 -04:00
parent 9e483004fc
commit b58dc52fc8
No known key found for this signature in database
GPG key ID: 5A6ED5CBF1A0A000

15
gum.go
View file

@ -96,7 +96,20 @@ type Gum struct {
Style style.Options `cmd:"" help:"Style some text."`
// Join provides a shell script interface for the lipgloss JoinHorizontal
// and JoinVertical commands.
// and JoinVertical commands. It allows you to join multi-line text to
// build different layouts.
//
// For example, you can place two bordered boxes next to each other:
// Note: We wrap the variable in quotes to ensure the new lines are part of a
// single argument. Otherwise, the command won't work as expected.
//
// $ gum join --horizontal "$BUBBLE_BOX" "$GUM_BOX"
//
// ╔══════════════════════╗╔═════════════╗
// ║ ║║ ║
// ║ Bubble ║║ Gum ║
// ║ ║║ ║
// ╚══════════════════════╝╚═════════════╝
//
Join join.Options `cmd:"" help:"Join text horizontally or vertically."`
}