Opening in terminal

Answered

According to the https://www.jetbrains.com/help/idea/terminal-emulator.html, "the Terminal runs with the current directory set to the root directory of the current project. You can change the default start directory in the Terminal settings or right-click any file (for example, in the Project tool window or any open tab) and select Open in Terminal: this will run the terminal in the directory of that file."

In my case both options do not work. My project is located in /Users/John/Desktop/X/myProject but terminal always opens on /Users/John/Desktop/ if I right click and choose Open in terminal. I checked the preferences and the start directory is set to /Users/John/Desktop/X/myProject. Drag and drop of a file also results in having /Users/John/Desktop/ displayed in terminal.

0
3 comments

Default start directory for terminal can be changed in Settings (Preferences on macOS) | Tools | Terminal | Project settings | Start directory. What do you have there? Does it help to set it there?

>or right-click any file (for example, in the Project tool window or any open tab) and select Open in Terminal: this will run the terminal in the directory of that file.

This will not set the default directory to a directory of this file. The documentation text is confusing. We will correct it.

0
Avatar
Permanently deleted user

The start directory is set to /Users/John/Desktop/X/myProject but, as already said, it always opens on Desktop so I need to to do additional cd to get to where I want.

I use Intellij Ultimate 2019.2.1.

0

Does it start in this directory even when you open Terminal tool window?

Please attach screenshot of Terminal settings.

0

Please sign in to leave a comment.