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

Should init-drupal prompt for options? #14

Open
hussainweb opened this issue Jul 6, 2020 · 2 comments
Open

Should init-drupal prompt for options? #14

hussainweb opened this issue Jul 6, 2020 · 2 comments

Comments

@hussainweb
Copy link
Member

Right now, commands like init-drupal accept a lot of options. It's easy to forget an option and by the time you realise it, you have to start all over again. As we think about adding new options, this problem is only going to get worse.

Should we instead prompt for options so that the user has a chance to specify each thing before the operation executes? Of course, if the user has specified it on the command line, that option won't be prompted. Let's weigh this option (pun intended):

Pros

  • No need to remember multiple options
  • User experience might be better as it will be interactive leading to lesser chance of typos

Cons

  • Harder to use in scripts (you have to specify each option in the command line or the script would get stuck waiting for inputs)

I am leaning towards prompts because I don't see this tool used that often. Since it is only used occasionally, it's harder to remember all the options. Prompts would be helpful in those cases. Also, I don't have a use case of using this tool in a script.

Are there any scenarios I am not considering?

@subhojit777
Copy link
Contributor

+1 on using prompts. For the "cons" you have mentioned, I think there is a solution for that - there could be a flag -y which if provided, then the init-drupal will be run with defaults.

I guess that -y could be made in sync with -i option in docker-run, so as to make room for the ability to run in CIs, but that is a different story. I think we can for sure use prompts and that will make the tool better.

@axl-mehulshah
Copy link

+1 for using prompts, just like what Lando does. That is easier. Just that if there are more options available, the prompt option might get lengthy. On the other side init-drupal --help provides all the options.

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

No branches or pull requests

3 participants