How to configure the "initial working directory" of the Terminal to be by default the same location as the current opened project?

Viewed 1608

When I open a Terminal in Eclipse, it's by default positioned at

$> /home/myUserName>$

I'm looking to configure it to be positioned at the same location as the current opened project.

Example

  • When I open the project "my-project-1" which is located at "/home/userName/path/to/my/personal/projects" then I open the Terminal, it'll be shown as this:

    $> /home/userName/home/userName/path/to/my/personal/projects/my-project-1>$

  • When I open the project "my-project-2" which is located at "/home/userName/path/to/my/personal/projects" then I open the Terminal, it'll be shown as this:

    $> /home/userName/home/userName/path/to/my/personal/projects/my-project-2>$

Note:

  • I'm using the Oxygen Release (4.7.0).
3 Answers

You cannot do this for "the currently opened project", but you can get close enough by choosing a specific project.
Preferences -> Terminal -> Local Terminal. Select "Variables..."
You then choose ${project_loc}, then click on "Configure" in the Argument box, start typing your chosen project name, and select it

It's September of 2021, running Eclipse 2021-06 and I still see "Variable references empty", and I get ../Eclipse.app/Contents/MacOS as my initial directory.

Related