gum
gum copied to clipboard
Update confirm.go
Hopefully Fixes #488
First trying go don't beat me
Desired changes
Usage: gum confirm [<prompt>]
Ask a user to confirm an action
Arguments:
[<prompt>] Prompt to display.
Flags:
-h, --help Show context-sensitive help.
-v, --version Print the version number
--default Default confirmation action
--affirmative="Yes" The title of the affirmative action
--negative="No" The title of the negative action
--timeout=0 Timeout until confirm returns selected value or default if provided ($GUM_CONFIRM_TIMEOUT)
Style Flags
--prompt.foreground="" Foreground Color ($GUM_CONFIRM_PROMPT_FOREGROUND)
--selected.foreground="230" Foreground Color ($GUM_CONFIRM_SELECTED_FOREGROUND)
--unselected.foreground="254" Foreground Color ($GUM_CONFIRM_UNSELECTED_FOREGROUND)
--selected.background="1" Selected Background Color ($GUM_CONFIRM_SELECTED_BACKGROUND)
--unselected.background="2" Unselected Background Color ($GUM_CONFIRM_UNSELECTED_BACKGROUND)
Hey @zen0bit, thanks for the PR. I believe you would need to add these flags / options to confirm/options.go first and then use the values in confirm/command.go