I want to create a context menu item in Finder.app to open selected items with Emacs. So why not document it for others to see. Might be instructive for some as well.
- Open the
- Create a new document of the type Quick Action.
- On the right side of the window select
files or foldersand
- On the left side select
Run Shell Scriptaction and drag it onto the canvas to build the workflow.
- In the
Run Shell Scriptstep change the
- With the following script one can select either one or more files/directories.
for f in "$@" do open -a Emacs "$f" done exit 0
- Go to File -> Save in the menu to save the workflow. Choose a name which will appear in the context menu.
- That is it. You will now find your new item in the context menu.