open application in terminal

I found solution of open sublime in terminal, but how can I open others app in terminal ?

##Copy following lines into ~/.bashrc or ~/.zshrc

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# -------
# Function
# -------
function google() { open "https://www.google.com/search?q=$*&gws_rd=ssl"; }
function baidu() { open "https://www.baidu.com/s?ie=UTF-8&wd=$*"; }
function github() { open "https://github.com/search?utf8=%E2%9C%93&q=$*"; }
# -------
# Aliases
# -------
alias chrome='open -a /Applications/Google\ Chrome.app'
alias sublime='open -a /Applications/Sublime\ Text\ 3.app'
alias xcode='open -a /Applications/Xcode.app'
alias mou='open -a /Applications/Mou.app'
...and so on

##Make sure ~/bash_profile contains following line

1
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi

#Usage

1
2
3
$ github bumaociyuan
$ chrome http://bumaociyuan.github.io/terminal/2015/08/17/open-application-in-terminal.html