Documentation
¶
Index ¶
- Constants
- Variables
- func Confirm(message string, defaultYes bool) bool
- func Error(format string, args ...any)
- func Header(text string)
- func Info(format string, args ...any)
- func PrintCdHint(path string)
- func Success(format string, args ...any)
- func Truncate(s string, max int) string
- func Warn(format string, args ...any)
- type Spinner
Constants ¶
const ( Current = "●" Pending = "◐" Pass = "✓" Fail = "✗" ArrowDown = "⇣" ArrowUp = "⇡" PushUp = "⬆" Dash = "—" NoReview = "○" ErrorMark = "✗" )
Glyphs used throughout the UI.
Variables ¶
var ( Green = color.New(color.FgGreen).SprintFunc() Yellow = color.New(color.FgYellow).SprintFunc() Red = color.New(color.FgRed).SprintFunc() Blue = color.New(color.FgBlue).SprintFunc() Cyan = color.New(color.FgCyan).SprintFunc() Magenta = color.New(color.FgMagenta).SprintFunc() Dim = color.New(color.FgHiBlack).SprintFunc() Bold = color.New(color.Bold).SprintFunc() GreenF = color.New(color.FgGreen).PrintfFunc() YellowF = color.New(color.FgYellow).PrintfFunc() BlueF = color.New(color.FgBlue).PrintfFunc() CyanF = color.New(color.FgCyan).PrintfFunc() DimF = color.New(color.FgHiBlack).PrintfFunc() )
Color shortcuts — matches the fish script's set_color calls.
Functions ¶
func Confirm ¶
Confirm prompts the user with a y/n question. defaultYes: if true, pressing Enter means yes (Y/n); if false, means no (y/N).
func PrintCdHint ¶
func PrintCdHint(path string)
PrintCdHint tells the shell wrapper to cd into the given path. When WT_CD_FILE is set (by the shell wrapper), writes the path to that file. Otherwise prints a hint so the user knows to cd manually.
Types ¶
type Spinner ¶
type Spinner struct {
// contains filtered or unexported fields
}
Spinner shows an animated wave indicator for long-running operations. The animation uses block element characters rendered as a 3-bar equalizer.
func NewSpinner ¶
NewSpinner starts an animated spinner with the given message (auto-dimmed). Call Stop() to clear the spinner line and release resources.
func NewSpinnerRich ¶
NewSpinnerRich starts a spinner that renders the message as-is, without wrapping it in Dim. Use this when the message contains its own ANSI colors.