Regarding running specific commands on specific files extensions, what about a more flexible config file system with a text file containing the extension + command to execute, something in the form of:
When ENter is pressed, the extension is read, checked if it's internally supported by the browser. If not, then the text file is parsed and, if found, the appropriate command executed with the file under the cursor as a parameter.
This way one can add support when new commands for other formats are released.
I don't know if it's possible for the browser to call the command and, when the command has finished processing or is cancelled, continue where it left off, or if it's needed to exit the browser and give control to the command.