I whipped up a script this morning to simulate Finder’s “Open With…” menu from the command line. It extends the macOS open command with a command line menu selection of apps able to open the file you specify.

This script uses the macOS commands mdfind and open, along with the third-party utilities duti and fzf or gum.

find . -name '*.rb' | fzf | open-with

Produces:

I’m going to paywall this one as bonus content for my supporters. Join at any level to get the script.

🔒

Premium Content

This content is for subscribers only.