Not sure I follow you... the built-in terminal opens in a project root directory by default. You can alter this behavior by specifying a directory to start in in Settings | Tools | Terminal, Start directory
I noticed that it states the right path under 'Start directory', but when I launch the terminal plugin when im already in my current project, it still starts from the default terminal path and not from the current project path
Well... You can configure the directory to start in - it's Preferences | Tools | Terminal, Start directory. But it looks as if you have a cd command or some scripts in your shell configuration file that cause the shell to сhange directory to your home dir on opening. Please check your .bashrc,.bash_profile, etc.
I`ll try to explain myself better using an example. Lets say my default working directory in bash is /Users/Jeho and my project is located in /Users/Jeho/project. After opening my project on WebStorm, I would like the built-in terminal to open directly on /Users/Jeho/project and not /Users/Jeho (and then navigate to /Users/Jeho/project). Anyway to configure it in WebStorm?
I had a default path defined in my profile. What helped to have the correct folder in Pycharm without changing the path elsewhere was to set an environment variable `PYCHARM=1` in Settings | Tools | Terminal, Environment variables
Well I do have a “start directory” setup as my HOME directory and now I can't change it back (if I clear the input it automatically gets set with my home directory). How to get back to the default behaviour? It's incredibly annoying! MacOS by the way.
In the terminal preferences, the Start directory field is set to your current project directory folder by default. What value would you like it to be re-set to? did you try choosing the corresponding folder manually using the file chooser (instead of clearing the field)?
I'm not sure what exact steps lead me there, but instead of the project I intended to open I had a *workspace* project for which the **start directory** defaulted to the home directory even when the prompt was cleared. When the project was reopened properly the problem has gone away. Thank you for your assistance!
I have experienced the same problem. And I noticed that [ ] square bracket symbols in my project folder name were causing this problem. Once I removed it, PowerShell was opened in the correct path.
Not sure I follow you... the built-in terminal opens in a project root directory by default. You can alter this behavior by specifying a directory to start in in Settings | Tools | Terminal, Start directory
thanks, but there is still a problem.
I noticed that it states the right path under 'Start directory', but when I launch the terminal plugin when im already in my current project, it still starts from the default terminal path and not from the current project path
Well... You can configure the directory to start in - it's Preferences | Tools | Terminal, Start directory. But it looks as if you have a cd command or some scripts in your shell configuration file that cause the shell to сhange directory to your home dir on opening. Please check your .bashrc,.bash_profile, etc.
Do you have `cd` commands defined in your .bashrc, etc? what OS are you on, what do your terminal preferences look like?
On Windows be sure that you have not overridden the
Im using macOS.
I`ll try to explain myself better using an example. Lets say my default working directory in bash is /Users/Jeho and my project is located in /Users/Jeho/project. After opening my project on WebStorm, I would like the built-in terminal to open directly on /Users/Jeho/project and not /Users/Jeho (and then navigate to /Users/Jeho/project). Anyway to configure it in WebStorm?
thanks
I had a default path defined in my profile. What helped to have the correct folder in Pycharm without changing the path elsewhere was to set an environment variable `PYCHARM=1` in Settings | Tools | Terminal, Environment variables
and using a condition in my powershell profile:
`if ($null -eq $env:PYCHARM) { Set-Location ~\another_folder }`
in my .bashrc I have a cd for when I run bash outside Intellij. This overrides the Start directory default in IntelliJ. Is there a way around that?
No, as the terminal sources .bashrc
Well I do have a “start directory” setup as my HOME directory and now I can't change it back (if I clear the input it automatically gets set with my home directory). How to get back to the default behaviour? It's incredibly annoying! MacOS by the way.
In the terminal preferences, the Start directory field is set to your current project directory folder by default. What value would you like it to be re-set to? did you try choosing the corresponding folder manually using the file chooser (instead of clearing the field)?
I'm not sure what exact steps lead me there, but instead of the project I intended to open I had a *workspace* project for which the **start directory** defaulted to the home directory even when the prompt was cleared. When the project was reopened properly the problem has gone away. Thank you for your assistance!
I have experienced the same problem. And I noticed that [ ] square bracket symbols in my project folder name were causing this problem. Once I removed it, PowerShell was opened in the correct path.