Sublime in iTerm
tl;dr:
How to launch editing in Sublime Text from Terminal
Objective
Being able to open Sublime Text directly from terminal in macOS
Prerequisites
For that obviously a running installation of Sublime Text is required.
Check
First we check if in our path, by running echo $PATH, we have included usr/local/bin.
Then, verify that the binary is available at the following location /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl
Config
We need to create a link of our command in our path, by running the following ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl ~/bin/subl
Testing
Trying to open a file in my current directory ~ subl robots.txt and voila.