Skip to content

Instantly share code, notes, and snippets.

@SerheyDolgushev
Created April 11, 2021 15:52
Show Gist options
  • Save SerheyDolgushev/7e08d7e17ef31d2ce2cf6102718d540b to your computer and use it in GitHub Desktop.
Save SerheyDolgushev/7e08d7e17ef31d2ce2cf6102718d540b to your computer and use it in GitHub Desktop.
Alias to open the current directory in the latest locally installed PHP Storm
# add following alias into ~/.bash_profile
phpstorm-open-current-path() {
PHP_STORM_CH=~/Library/Application\ Support/JetBrains/Toolbox/apps/PhpStorm/ch-0
PHP_STORM_LATEST_VERSION=$(ls -rA1 "${PHP_STORM_CH}" | head -1)
open -a "${PHP_STORM_CH}/${PHP_STORM_LATEST_VERSION}/PhpStorm.app"
}
# usage
cd <PROJECT_DIR>
phpstorm-open-current-path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment