I'm attempting to make an open in Sublime Text 2 service via Automator.
I am doing this by:
- Running Automator
- Adding a new service
- Adding "Run Shell Script"
- Setting Shell to
/bin/zsh
- Entering a command line of:
/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl -n $@
- Setting "Service receives selected" to "files or folders"
- Click save
Screenshot:
However, whenever I try to open a folder via right-click > services > "Open in Sublime", a new ST2 window is opened but with a randomly named text file (ie subl stdin N188RN.txt) and it's output is the path of the folder opened (ie: /Users/me/Desktop/project).
Screenshot:
Is there a way I can modify the automator command line to fix this?