How to open a terminal via intellij in the selected folder

I want to right click on a file in intellij and open the terminal there in mac. I tried 'External Tools' but doesn't open the terminal in the selected directory even though I set $FileDir$ as the working directory of that tool

1 comment
Comment actions Permalink

Working directory is the process property, it doesn't translate to the default directory of the Terminal application.

You need to pass a command to the Terminal process, something like "cd $FileDir$". It appears that you would need to use AppleScript for that, see https://superuser.com/questions/218816/os-x-terminal-make-a-shortcut-that-opens-to-a-specific-folder .

If you find a way to open Terminal in certain location from another Terminal window command, you can do the same from the External Tool, so the question becomes OS specific, not IDE specific.

0

Please sign in to leave a comment.