You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow cabal init to create a new project directory #7871
Currently, cabal init initializes a new project in the current directory. It would be nice if it could also create a new directory where the project is located, so that one doesn't have to do that manually, similar to stack new. This could also be a new cabal new command.
I don't think it's possible as it is right now; however I also don't think it would be a hard feature to implement at all. I'll come up with a PR. About the command, I'm not sure about neither cabal init new or cabal new, I believe that it might fit better to define it as a flag.
cabal init currently takes no arguments. Instead it could take one optional argument which is the name of the directory to create and init in, and the behavior with no arguments would stay the same (init in the current directory).
Activity
Mikolaj commentedon Dec 19, 2021
Or
cabal init new? @ptkato: what do you think? Perhaps this is already possible somehow?ptkato commentedon Dec 19, 2021
I don't think it's possible as it is right now; however I also don't think it would be a hard feature to implement at all. I'll come up with a PR. About the command, I'm not sure about neither
cabal init neworcabal new, I believe that it might fit better to define it as a flag.bacchanalia commentedon Dec 19, 2021
cabal initcurrently takes no arguments. Instead it could take one optional argument which is the name of the directory to create and init in, and the behavior with no arguments would stay the same (init in the current directory).ptkato commentedon Dec 20, 2021
There we go, yes, using the extra arguments is way more self-contained.