About MIME: is it possible to always "Open With“ text file with a a command line script? I want to always "Open With" text file, such .cpp/.h files with a command line script. I can use "cmd+shift+G" to open the folder of the command line script. However, Mac OS does not allow me to choose the script. Mac OS only allows me to use Applications.

So is there any workaround?

Thanks
You would not only have to create an app, but you’d have to be able to assign it to open files of that type. That seems like it would outside the ability of most users, so I’m going to disqualify it as a “solution”.

The only option that I can think of would be to use Keyboard Maestro to assign a keyboard shortcut to open a selected file in Finder with the shell script.

The precise way to do this can be found by asking at http://forum.keyboardmaestro.com/.