Check out example codes for "open sublime text 3 from terminal mac". It will help you in understanding the concepts better.

Code Example 1

ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl

Code Example 2

export PATH=/bin:/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:$PATH
export EDITOR='subl -w'

Learn ReactJs, React Native from akashmittal.com