External tools chaining commands with one keystroke

I have 2 commands I would like to invoke with 1 keystroke:

/usr/local/bin/phpcbf --standard=Drupal /Users/yhessels/Projects/ros-d7/sites/all/modules/custom/module_education/inc/module_education.stats.inc;/usr/local/bin/phpcs --colors --report-width=200 --standard=Drupal /Users/yhessels/Projects/ros-d7/sites/all/modules/custom/module_education/inc/module_education.stats.inc

This works if I paste this in my terminal window but not when I add this as an external tool inside phpstorm.


The result from inside my terminal:

Is there a solution for this in Phpstorm?

2 comments
Comment actions Permalink

you can neither run several commands at once using external tools nor specify a program to run in another program 'arguments' field. If you like to combine several commands to have them executed at once, you can create a shell script that would run both commands and accept parameters, and then configure this shell script as external tool

1
Comment actions Permalink

Thanks, it works!

#!/bin/bash
/usr/local/bin/phpcbf --standard=Drupal $1; /usr/local/bin/phpcs --colors --report-width=200 --standard=Drupal $1

0

Please sign in to leave a comment.