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

Make it easier to determine new project directory after neuro project init #1230

Closed
astaff opened this issue Dec 6, 2019 · 2 comments · Fixed by #1254
Closed

Make it easier to determine new project directory after neuro project init #1230

astaff opened this issue Dec 6, 2019 · 2 comments · Fixed by #1254
Assignees

Comments

@astaff
Copy link
Contributor

astaff commented Dec 6, 2019

Every time I create a new project, my immediate next action is to cd into project directory and either open it in my editor or run make setup. Things get more complicated if project slug is different from actual name.

My current workaround is to copy-paste slug suggested from neuro project init prompt which adds a manual step and complicates writing tutorials.

I see a few possible solutions:

  1. Automatically change into project directory, then the name can be obtained using ${PWD##*/}. Drawback is some users might not expect this side effect from running the cli. git init and Create React App don't cd.

  2. Take directory name as an optional argument in neuro project init: check if it's a valid slug and default slug and long name to it. git init does the same.

I am favoring no. 2 as it can also make neuro project init ask less questions. I am using React scaffolding as an example.

@asvetlov
Copy link
Contributor

neuro cannot change the current directory of the parent process, the shell in your example.
Option 1) is impossible.

@astaff
Copy link
Contributor Author

astaff commented Dec 10, 2019

Thanks, @asvetlov . Looks like no. 2 it is, unless there are other suggestions

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