Thomas' Tech Tips

Open Sublime Text from command-line

23 February 2025 - Thomas Damgaard

In order to easily edit a file in Sublime Text from the command-line on macOS, a small helper binary is provided. This binary, however, is not included in the PATH by default.

In order to easily open files in Sublime Text from the Terminal on macOS, I add this alias to my .zshrc:

alias subl='/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl'
Filed under: howto, macos, shell, sublimetext, tips, zsh

Back to article list