Creating a Quick Action in macOS that allows you to right-click any folder and open it directly in Zed editor.
#!/bin/bash
# Get the selected folder path from Automator
for f in "$@"
do
# Check if the path exists
if [ -d "$f" ]; then
# Open Zed with the folder
/usr/local/bin/zed "$f"
fi
done
- Open Automator (you can use Spotlight to find it)
- Create a new Quick Action (File > New)
- Set "Workflow receives" to folders in Finder
- Add a Run Shell Script action (search for it in the actions library)
- Copy the script above into the shell script box
- Set "Pass input" to as arguments
- Save the Quick Action with a name like "Open in Zed"