Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: interactive confirm with confirmation#648

Open
KarolosLykos wants to merge 6 commits intopterm:masterfrom
KarolosLykos:issue-644-Interractive_confirm_with_confirmation
Open

feat: interactive confirm with confirmation#648
KarolosLykos wants to merge 6 commits intopterm:masterfrom
KarolosLykos:issue-644-Interractive_confirm_with_confirmation

Conversation

@KarolosLykos
Copy link
Contributor

Fixes #644

To address this, I propose introducing a new option WithConfirmation(true) to the pterm.DefaultInteractiveConfirm to enable the behavior of waiting for the user to confirm their answer by pressing the <Enter> key.

I have created a draft pull request that introduces this new option named WithConfirmation. I'm seeking feedback on whether you agree with this approach and if you'd like to proceed with it.

@codecov
Copy link

codecov bot commented Mar 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.86%. Comparing base (bbec97f) to head (6aad08b).
Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #648      +/-   ##
==========================================
+ Coverage   80.71%   80.86%   +0.14%     
==========================================
  Files          33       33              
  Lines        4210     4248      +38     
==========================================
+ Hits         3398     3435      +37     
- Misses        738      739       +1     
  Partials       74       74              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@elfrucool
Copy link

It feels a bit odd that after typing y or n it writes a new line with the legend (Press enter to confirm), it would be better if the (Press enter to confirm) appears the first time and when typing y/n it doesn't go to next line, but, instead replaces the text on same line until press enter

@elfrucool
Copy link

apart of that, I like it

@KarolosLykos KarolosLykos marked this pull request as ready for review March 14, 2024 15:32
@KarolosLykos KarolosLykos changed the title feat: interractive confirm with confirmation feat: interactive confirm with confirmation Mar 16, 2024
@github-actions github-actions bot added feature and removed feature labels Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make interactive confirm optionally accept return key for confirmation

2 participants