Last active
March 27, 2024 10:02
-
-
Save tonysneed/f9f09bfa28bcf98e8d8306f9b21f99e2 to your computer and use it in GitHub Desktop.
Add a command to Finder services in Mac OSX to open a folder in VS Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Open Automator | |
- File -> New -> Service | |
- Change "Service Receives" to "files or folders" in "Finder" | |
- Add a "Run Shell Script" action | |
- Change "Pass input" to "as arguments" | |
- Paste the following in the shell script box: open -n -b "com.microsoft.VSCode" --args "$*" | |
- Save it as something like "Open in Visual Studio Code" |
updated for Big Sur (doesn't run a script, picks the app's icon) https://gist.github.com/aamnah/9b66ab2462e1b50358455dbd3c9c2f0f
Thank you so much
it dosen't work
i had the same problem try this:
https://brianli.com/how-to-fix-automator-operation-not-permitted-error-in-macos-catalina/
wow...thanks man, still works with Mojave.
This is great, thanks!
Brilliant! Thanks
Still works in MacOS Sonoma Mar 2024. Thank you! The "Quick Action" tip from above still applies.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for this!
Here's an update for Catalina, since Automator has changed a bit over time...
After saving, it should be available on any folder in Finder under the menu Services