mirror of
https://github.com/charmbracelet/gum
synced 2026-03-14 13:45:45 +01:00
Hide Style Flags consistently (#457)
* refactor: hide style flags on error to not clutter usage * docs(style): add comment regarding dynamically hiding flags
This commit is contained in:
parent
fb6849ca16
commit
01a66511a1
14 changed files with 57 additions and 102 deletions
|
|
@ -8,10 +8,8 @@ import (
|
|||
|
||||
"github.com/charmbracelet/gum/internal/exit"
|
||||
|
||||
"github.com/alecthomas/kong"
|
||||
"github.com/charmbracelet/bubbles/filepicker"
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/charmbracelet/gum/style"
|
||||
)
|
||||
|
||||
// Run is the interface to picking a file.
|
||||
|
|
@ -72,9 +70,3 @@ func (o Options) Run() error {
|
|||
|
||||
return nil
|
||||
}
|
||||
|
||||
// BeforeReset hook. Used to unclutter style flags.
|
||||
func (o Options) BeforeReset(ctx *kong.Context) error {
|
||||
style.HideFlags(ctx)
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue