Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: Add confirm prompts to some cli actions#1591

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Emyrk merged 18 commits intomainfromstevenmasley/skip_prompt
May 20, 2022

Conversation

Emyrk
Copy link
Member

  • Workspace start/stop
  • Add optional -y skip. Standardize -y flag across commands

- Workspace start/stop- Add optional -y skip. Standardize -y flag across commands
@EmyrkEmyrk requested a review fromAbhineetJainMay 19, 2022 19:56
Copy link
Contributor

@AbhineetJainAbhineetJain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks for adding the tests.

@Emyrk
Copy link
MemberAuthor

I cannot figure out why Mac is failing 🤔

Copy link
Member

@mafredrimafredri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Nice change!

Just an idea: Would it be nice to have--yes as a global always-enabled flag? My thought here is that users who don't care about prompts may want to always append the-y flag, even if that's sensible or not.

// "yes" makes no sense.
if opts.IsConfirm && cmd.Flags().Lookup("yes") != nil {
if skip, _ := cmd.Flags().GetBool("yes"); skip {
return "yes", nil
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Should we print to the terminal here e.g.Confirm create? (yes/no) yes, orSkipping: Confirm create? (yes/no) just to make it clear that the--yes flag had an effect?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@mafredri I was unsure. Do other applications do this?apt-get does not have any indication for example.

For scripting purposes, I would imagine we want to reduce output to near 0 if we can.

@Emyrk
Copy link
MemberAuthor

Nice change!

Just an idea: Would it be nice to have--yes as a global always-enabled flag? My thought here is that users who don't care about prompts may want to always append the-y flag, even if that's sensible or not.

I am not opposed to making it a global flag, would like to hear what others think. It's an easy change.

@EmyrkEmyrkenabled auto-merge (squash)May 20, 2022 15:52
@EmyrkEmyrk merged commitad946c3 intomainMay 20, 2022
@EmyrkEmyrk deleted the stevenmasley/skip_prompt branchMay 20, 2022 15:59
kylecarbs pushed a commit that referenced this pull requestJun 10, 2022
* feat: Add confirm prompts to some cli actions- Add optional -y skip. Standardize -y flag across commands
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@mafredrimafredrimafredri approved these changes

@AbhineetJainAbhineetJainAbhineetJain approved these changes

@deansheatherdeansheatherdeansheather approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@Emyrk@mafredri@AbhineetJain@deansheather

[8]ページ先頭

©2009-2025 Movatter.jp