Launch CLion using the GUI, then launch Terminal and run the following to find which process is running:
ps -ae| grep lion
Output
57257 ?? 0:20.45 /Applications/CLion.app/Contents/MacOS/clion 57434 ttys000 0:00.00 grep lion
So, I need a command, which in my case to run CLION from the command line:
/Applications/CLion.app/Contents/MacOS/clion
Then you need to pass the directory containing your project so that you can make this function:
function CLion { /Applications/CLion.app/Contents/MacOS/clion "$1"; }
Then you can simply enter:
Clion ~/CLionProjects/someProject
source share