| 123456789101112131415161718192021222324252627282930313233343536 |
- // TODO implement interface for browse bugs in folder
- //
- // For example:
- // If the user provides the path of a folder that matches spec for a bug,
- // just display that bug. Otherwise treat the specified path as a collection
- // of bugs.
- //
- // See Also:
- // - charmbracelet/bubbles directory and tree explorer
- package main
- import (
- "flag"
- "fmt"
- "issho"
- "os"
- tea "github.com/charmbracelet/bubbletea"
- )
- func main() {
- flag.Parse()
- arg := flag.Args()
- bug, _ := issho.Issue.NewFromPath(issho.Issue{}, arg[0])
- p := tea.NewProgram(
- issho.Model{Issue: bug},
- tea.WithAltScreen(), // use the full size of the terminal in its "alternate screen buffer"
- // tea.WithMouseCellMotion(), // turn on mouse support so we can track the mouse wheel
- )
- if _, err := p.Run(); err != nil {
- fmt.Println("could not run program:", err)
- os.Exit(1)
- }
- }
|