pohmelie / run-in-terminal

Atom package for run some commands in terminal, or just run terminal
MIT License
17 stars 7 forks source link

default to first project dir when no file is open #9

Closed clintwood closed 9 years ago

clintwood commented 9 years ago

When there is no file open the terminal opens with a cwd of the tool/cmd being used. It may make more sense to default to the first project dir.

I guess ideally there should be an option for this and when not checked show an error.

Please feel free to close if this functionality is not wanted/needed ;)

pohmelie commented 9 years ago

I don't get the problem. Can you make an example of project structure and actions.

clintwood commented 9 years ago

@pohmelie, its actually easy to see the 'problem'. First I'm on Windows but I don't think this makes a difference.

To produce the issue

Without the PR the terminal (cmd prompt in my case) opens at C:\Users\user-name\AppData\Local\atom\app-1.0.3>

With the PR the terminal will default to the first project directory like this (in my case): D:\ITNodeJS\_gitsub\kaps-stack\kaps-logger>

pohmelie commented 9 years ago

I have just check this issue and it definetly should be merged. But I will do some style corrections after and maybe some refactoring. Thanks for pull! :clap:

clintwood commented 9 years ago

Cool! Thanks!