-
Notifications
You must be signed in to change notification settings - Fork 59
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
Allow users to answer e at prompts #183
Conversation
src/cli/interaction.rs
Outdated
"n" | ||
} | ||
.green(), | ||
maybe_explain = if !explaining { |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
There was a problem hiding this 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 { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure!
Closes #177