> To add minimal complexity we could use as an example > the recent design of context-menu-functions that is a hook. > > Then we could create a new customizable hook that can contain > a list of functions that return the command candidates depending > on the argument with file names. > > Then its possible options for such hook could include: > > - xdg-open-function > - mailcap-function that adds mailcap candidates > - dired-x-guess that adds existing dired-guess-shell-alist-default > - Windows-specific candidates from w32-shell-execute > - etc. Here is the implementation: