Last active
January 30, 2019 14:03
-
-
Save takuya/7f379a034f0b5a0d8c0c0d0794a2830c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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