On Mac OS X, I know one can open a file from the commandline with its default application with open
, and with other applications with open -a <application name>
. Thus,
open movie.avi
open -a VLC movie.avi
open movie.avi -a VLC
all work. My only complaint is that when I type
open movie.avi -a <TAB>
it completes over all applications that exist on the computer — for instance in zsh I get
zsh: do you wish to see all 793 possibilities (200 lines)?
— while what I would like is for it to complete over only the handful of applications that Finder's "Open With" menu would have shown.
So is there a way to access this list that Finder knows, and make my shell (zsh, but I can switch to bash if it helps) aware of the list, in such a way that tab completion would show only those applications?
Best Answer
AllApplications
duti
(It's missing some apps that are displayed in the open with menu though.)