bubbletea

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 12, 2022 License: MIT Imports: 6 Imported by: 138

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Middleware

func Middleware(bth BubbleTeaHandler) wish.Middleware

Middleware takes a BubbleTeaHandler and hooks the input and output for the ssh.Session into the tea.Program. It also captures window resize events and sends them to the tea.Program as tea.WindowSizeMsgs. By default a 256 color profile will be used when rendering with Lip Gloss.

func MiddlewareWithColorProfile

func MiddlewareWithColorProfile(bth BubbleTeaHandler, cp termenv.Profile) wish.Middleware

MiddlewareWithColorProfile allows you to specify the number of colors returned by the server when using Lip Gloss. The number of colors supported by an SSH client's terminal cannot be detected by the server but this will allow for manually setting the color profile on all SSH connections.

Types

type BubbleTeaHandler

type BubbleTeaHandler func(ssh.Session) (tea.Model, []tea.ProgramOption)

BubbleTeaHander is the function Bubble Tea apps implement to hook into the SSH Middleware. This will create a new tea.Program for every connection and start it with the tea.ProgramOptions returned.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL