Description of problem:
Something I've been thinking about for a long time: It would sometimes be
practical to be able to open a file or URL the "right" way according to the
desktop config from the command line, i.e. to have a single command that would
simulate double-click in desktop window for normal file arguments, do something
similar to "htmlview" (the current Raw Hide version that actually honours the
"Preferred Applications" settings) for http type URLs etc.
Enough said, I think.
Created attachment 90294 [details]
Sample "fileopen" command
Of course, a separate app that will do this is not hard to write; see
Created attachment 90295 [details]
filetype: Just display the file type, don't open file
Thought I might throw in another one for good measure; this is "filetype",
which will just display the MIME type of the files (or URIs) passed on the
command line. In other words, it's rather like good, old "file", but will look
up information in the GNOM file type database instead of "magic".
I've just submitted an upstream bug report requesting such a program.
Take a look at the patch attached to the bug.