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

Allow users to answer e at prompts #183

Merged
merged 5 commits into from
Jan 12, 2023

Conversation

Hoverbear
Copy link
Contributor

Closes #177

@Hoverbear Hoverbear self-assigned this Jan 12, 2023
@Hoverbear Hoverbear added this to the v0.0.2 milestone Jan 12, 2023
@Hoverbear Hoverbear requested a review from cole-h January 12, 2023 18:17
"n"
}
.green(),
maybe_explain = if !explaining {
Copy link
Member

Choose a reason for hiding this comment

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

What is this explaining bool for? At first I thought it was something like "can this prompt be explained", then I thought it was "are we explaining this prompt", and now I'm not sure.

If it's the first, could it be renamed to can_explain, and if it's the second, can it be renamed to already_explaining or is_explaining or currently_explaining or something?

@@ -3,24 +3,58 @@ use std::io::{stdin, stdout, BufRead, Write};
use eyre::{eyre, WrapErr};
use owo_colors::OwoColorize;

#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum PromptChoice {
Copy link
Member

Choose a reason for hiding this comment

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

🎉

Copy link
Member

@cole-h cole-h left a comment

Choose a reason for hiding this comment

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

LGTM.

maybe_explain = if !currently_explaining {
format!(
"/{}",
if default == PromptChoice::Explain {
Copy link
Member

Choose a reason for hiding this comment

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

Since it's not obvious what E could be, maybe in the future, we should change the prompt to look like ([Y]es/[n]o/[e]xplain) (and all its variations.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure!

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.

Allow users to answer e at install prompt
2 participants