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

Add cabal init --no-comments option to config file #8835

Closed
Lysxia opened this issue Mar 9, 2023 · 5 comments · Fixed by #8839
Closed

Add cabal init --no-comments option to config file #8835

Lysxia opened this issue Mar 9, 2023 · 5 comments · Fixed by #8839

Comments

@Lysxia
Copy link
Contributor

Lysxia commented Mar 9, 2023

I'd like to use cabal init non-interactively. How can I configure its default behavior? In particular I'd like to set the --no-comments option in the config file.

@ffaf1
Copy link
Collaborator

ffaf1 commented Mar 9, 2023

Alas in ~/.cabal/config, in the init section, I see an interactive: option but not a comments: one.

@ulysses4ever
Copy link
Collaborator

It's a valid feature request. Shouldn't be hard to implement.

I fail to find another ticket where someone wanted a config field for author and stuff like that, but we suggested they use arguments and maybe wrap a cabal init call with those arguments in a script…

@ulysses4ever
Copy link
Collaborator

I did a quick experiment here: ulysses4ever@1d3c743

It's easy but it needs couple more pushes that I don't know when I can get to, so please take over if you feel like it:

  • it needs a test
  • it's not clear which init flags we want to allow: besides no-comments it seemed reasonable to allow quiet, simple and minimal (the last one implies no-comments btw). But maybe author and email too? Something else?

@Lysxia
Copy link
Contributor Author

Lysxia commented Mar 10, 2023

When I use cabal init it already knows my name (author and email). I can't find out where that's stored though.

@ulysses4ever
Copy link
Collaborator

@Lysxia it fetches it from your git config. One can imagine a setup without git available. It would be a very rare setup of course.

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

Successfully merging a pull request may close this issue.

3 participants