Skip to content
Myr

command.go

This file

Path

join/command.go

33 lines · 1.2 KiB · Go

Last changed by

chore: prepare v2 (#1116)Drew Smirnoffbefore adoption02d6f06

History of this file

Take it

The walk stopped after 200 commits: lines older than 6837ed2 point at it.

feat(deps): bump github.com/charmbracelet/bubbletea from 0.27.0 to 1.0.0 (#661)dependabot[bot]before adoption6837ed2

lines 1–18why, one step back
1// Package join provides a shell script interface for the lipgloss
2// JoinHorizontal and JoinVertical commands. It allows you to join multi-line3// text to build different layouts.4//5// For example, you can place two bordered boxes next to each other: Note: We6// wrap the variable in quotes to ensure the new lines are part of a single7// argument. Otherwise, the command won't work as expected.8//9// $ gum join --horizontal "$BUBBLE_BOX" "$GUM_BOX"10//11// ╔══════════════════════╗╔═════════════╗12// ║ ║║ ║13// ║ Bubble ║║ Gum ║14// ║ ║║ ║15// ╚══════════════════════╝╚═════════════╝16package join1718import (

chore: update to bubbletea v2 (#1112)Drew Smirnoffbefore adoptionf6dd28e

line 19why, one step back
19 "charm.land/lipgloss/v2"

feat(deps): bump github.com/charmbracelet/bubbletea from 0.27.0 to 1.0.0 (#661)dependabot[bot]before adoption6837ed2

line 20why, one step back
20

chore: prepare v2 (#1116)Drew Smirnoffbefore adoption02d6f06

lines 21–22why, one step back
21 "charm.land/gum/v2/internal/decode"
22 "charm.land/gum/v2/internal/tty"

feat(deps): bump github.com/charmbracelet/bubbletea from 0.27.0 to 1.0.0 (#661)dependabot[bot]before adoption6837ed2

lines 23–30why, one step back
23)
2425// Run is the command-line interface for the joining strings through lipgloss.26func (o Options) Run() error {27 join := lipgloss.JoinHorizontal28 if o.Vertical {29 join = lipgloss.JoinVertical30 }

chore: update to bubbletea v2 (#1112)Drew Smirnoffbefore adoptionf6dd28e

line 31why, one step back
31 tty.Println(join(decode.Align[o.Align], o.Text...))

feat(deps): bump github.com/charmbracelet/bubbletea from 0.27.0 to 1.0.0 (#661)dependabot[bot]before adoption6837ed2

lines 32–33why, one step back
32 return nil
33}