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

Interactive stack new #1565

Open
mgsloan opened this issue Dec 26, 2015 · 4 comments
Open

Interactive stack new #1565

mgsloan opened this issue Dec 26, 2015 · 4 comments

Comments

@mgsloan
Copy link
Contributor

mgsloan commented Dec 26, 2015

In the past, interactive stack new was discussed. I'm opening this issue to track adding an interactive prompt for template parameters. Leaving the prompts empty and just pressing enter should select a default value.

Additionally, an excellent suggestion comes from wcauchois, which is to attempt to get name / email info from git. If this info is available, use it as a default in the interactive prompt.

@gambogi
Copy link
Contributor

gambogi commented Jan 15, 2016

Unless someone else is working on this, I'll take it. For clarity, I'm assuming this is to be in the style of cabal --init

@mgsloan
Copy link
Contributor Author

mgsloan commented Jan 16, 2016

Go for it, that'd be great!

@gambogi
Copy link
Contributor

gambogi commented Jan 16, 2016

Do we only want NewOpts interactively? Or would it be appropriate to also get InitOpts?

Where should the interactive code live? It feels natural for it to go in Stack.New. If other commands do interaction (and it seems like there have been discussions to that effect) the actual interaction helper functions should probably be separate. A module like that doesn't already exist, right?

I was looking over Cabal's init implementation, and was thinking about taking it in that direction if that seems reasonable.

@mgsloan
Copy link
Contributor Author

mgsloan commented Jan 18, 2016

Where should the interactive code live? It feels natural for it to go in Stack.New. If other commands do interaction (and it seems like there have been discussions to that effect) the actual interaction helper functions should probably be separate. A module like that doesn't already exist, right?

Right, a module like that doesn't exist yet. It makes sense to me to create a module of utilities which handle user input stuff, though. Here's the only other spot, AFAIK, where stack asks for user input: https://github.com/commercialhaskell/stack/blob/master/src/Stack/Ghci.hs#L212

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants