Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update confirm.go #492

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update confirm.go #492

wants to merge 1 commit into from

Conversation

zen0bit
Copy link

@zen0bit zen0bit commented Feb 6, 2024

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)

@maaslalani
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change Usage: gum confirm
2 participants