Run terminal command from external tools [ANSWERED]

Answered

Although I've done a extensive search in Google and here in the forums I could not find a way to using the External Tools create a Tool that opens the terminal from IntelliJ and run a pre-determined command.

Example:

Now I'll navigate to the package.json file and right click to select "Open in Terminal". When the Terminal is opened I'll type "rm -rf node_modules && npm install".

What I want is to create a Tool that takes the current file directory as reference and run a predetermined command in Intellij's terminal.

Something as simple as this, doesnt work:

 

Can I achieve this purely with IntelliJ or do I need a plugin? Or is this not possible at all?

I have IntelliJ Ultimate with MacOS.

Thanks!

2
2 comments

 

Arguments:

--login -c "<your command>"
6

@Serge you're my hero.

Thanks a bunch friend! You've saved me hours per year ;-)

1

Please sign in to leave a comment.