gum/main.go
2022-07-06 12:05:45 -04:00

33 lines
591 B
Go

package main
import (
"github.com/alecthomas/kong"
"github.com/charmbracelet/sodapop/internal/stdin"
)
func main() {
pop := &Pop{}
ctx := kong.Parse(pop,
kong.Name("pop"),
kong.Description("Make your shell pop."),
kong.UsageOnError(),
kong.ConfigureHelp(kong.HelpOptions{
Compact: true,
Summary: false,
}))
switch ctx.Command() {
case "input":
pop.Input.Run()
case "search":
pop.Search.Run()
case "spin <command>":
pop.Spin.Run()
case "style":
pop.Style.Text, _ = stdin.Read()
pop.Style.Run()
case "style <text>":
pop.Style.Run()
case "layout":
}
}