-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Remove default suffix for prompts #21
Comments
I agree, I see no use in having a default suffix. |
I like either removing the if (!promptMessage.match(/[?|:]$/)) {
promptMessage += type === 'confirm' ? '?' : ':';
} Because: prompt({
type: 'confirm',
message: 'Would you like to proceed'
}, function(){}); would be:
but it might look better:
|
I think a user needs to know what they'll get if they press enter. Currently the jekyllrb generator grabs a user's name, email, and github user name from the .gitconfig, and gives a prompt like:
Without a default, how does I know that:
on enter will insert my email that includes my painfully long last name? |
@stephenplusplus suggestion make sense, if there's no suffix in the prompt already, we can add a default one. I think it'll be a pretty edge case if a user don't want to use any prefix. (And I think this edge case would be better served with #18 functionnality) |
Ha, sorry, by "default suffix" I thought we were talking about the |
@robwierzbowski Sorry, I should have been clearer in the original comment. I definitely do not want to remove those. :) |
Another thing to add: I didn't find the part in the code for this, but if you do not provide a custom |
@passy I'm not sure I follow here, if you don't enter a I forced default parameter with errors messages on the lastest master to prevent weird issue and error messages. Although, I'd like to hear back from you on this bug as I believe you made a typo? |
Interesting! I guess I just overlooked some piece of code in the generator that was responsible for dynamically creating the message. Sorry for the confusion. :) |
Now suffix only happens if the last character of the I tough about just removing the suffix; but that was problematic as the input could be directly glued to the message (could always add a space, but that's just throwing the ball around). So there's no big logic, but there's a safe fallback if the I'll release this change with next 0.1.10 - not sure when, but shouldn't be too far off. |
@SBoudrias Thanks! :) |
I'd like to discuss whether the a default suffix for prompts is helpful.
generator-generator
for example has a lot of its prompts in form of a question, so there's no need to append a colon:I would like to know what others think about this. :)
The text was updated successfully, but these errors were encountered: