Skip to content

Instantly share code, notes, and snippets.

@takuya

takuya/pycharm

Last active Jan 30, 2019
Embed
What would you like to do?
#!/usr/bin/env bash # -x -v
name=`basename $0`
APP_PATH=`realpath ~/Applications/JetBrains\ Toolbox`
declare -A APPNAME
APPNAME[phpstorm]="$APP_PATH/PhpStorm.app"
APPNAME[idea]="$APP_PATH/IntelliJ IDEA Ultimate.app"
APPNAME[pycharm]="$APP_PATH/PyCharm Professional.app"
APPNAME[webstorm]="$APP_PATH/WebStorm.app"
APPNAME[rubymime]="$APP_PATH/RubyMine.app"
APP=${APPNAME[$name]}
ARGS=()
for arg; do
if [[ -e $PWD/$arg ]] ; then
ARGS+=($PWD/$arg)
fi
done
echo open -a "$APP" --args ${ARGS[*]}
open -a "$APP" --args ${ARGS[*]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment