0

I'm using zsh and trying to create a shortcut, stt, so I can open a folder in sublime text. I've currently added an alias that I found on a website, but it only opens a blank sublime, with no files from my folder. I'm not sure what I need to add. Thanks.

alias stt="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
Damien Flament
  • 1,465
  • 15
  • 27
b.herring
  • 563
  • 2
  • 18

1 Answers1

0

Documentation from subl:

subl --help
Sublime Text 2 Build 2221                                                                                                                                                                                                                     

Usage: sublime_text [arguments] [files]         edit the given files
   or: sublime_text [arguments] [directories]   open the given directories

Arguments:
  --project <project>: Load the given project
  --command <command>: Run the given command
  -n or --new-window:  Open a new window
  -a or --add:         Add folders to the current window
  -w or --wait:        Wait for the files to be closed before returning
  -b or --background:  Don't activate the application
  -h or --help:        Show help (this message) and exit
  -v or --version:     Show version and exit

Filenames may be given a :line or :line:column suffix to open at a specific
location.

To make the stt alias open a new window with the current working directory opened:

alias stt='/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -n -a .'
Damien Flament
  • 1,465
  • 15
  • 27