I want to select an application installed from Homebrew for dealing with files of a certain type. At first I discovered that the "Open with..." dialog won't even show /opt and other directories. So I found a thread here that suggests running this:
$ defaults write com.apple.Finder AppleShowAllFiles YES $ killall Finder
OK, I did that. Now I can navigate to the directory with the applications under /opt but when I come to the list of binaries there they are "grayed out" so I can't select them. I selected Enable: All Applications but it doesn't make a difference. How can I make Finder just do the right thing? Also, sometimes I'd want to use a command line app. In other OSes sometimes you can associate the filetype with something like:
Terminal -c foobar %s
Where "Terminal" is any given console and %s is the file to open.
The file I want to associate with the filetype is a symlink if that matters.
What is the way to do this on Mac?
Edit: is there a shell script or set of steps for creating an ersatz
.app directory, enough to make Finder see it?