To create a idea
command in your terminal to open a given project directory with IntelliJ IDEA, type the following command in terminal
alias idea="open -a 'IntelliJ IDEA CE' $@"
To keep this alias every time you open a new terminal in future, add the above line anywhere in your ~/.zshrc
file.