How to set the default command, with options, to open a file on MacOS? I know how to a associate default application to open a particular file type. But I want to open a file with &quot;command -option1 -option2&quot; when I double-click in Finder or when I invoke &quot;open&quot; command on terminal. For example, I want to open all the text files using command &quot;emacsclient -a emacs -c&quot;. How to do this on MacOS?
Create an Apple/Shell script or Automator action. The Shell script can be put in a Wrapper like Platypus, the Automator action can be clickable or even a service.