I am a keyboard junkie, and I encourage others to use it more than the average use and experience the change, whether it is in the console or one of the modern keyboard-driven launchers.
One of the complaints I keep hearing is that with the command line, people have to type in name of the executable to open a document. Whereas in the GUI world, you just double-click on a document, or on the application icon. And I realized it was not so much about typing the application name, it was more about having to remember application executable name along with the file name.
So here is a solution for those of you on Linux and possibly other Unix systems. What we need is an application which can identify the application for a specific file type and open it for us. And we already have something for this – xdg-open. It is part of the XdgUtils toolkit which aims at better desktop integration across various desktop environments. And most of the popular DEs qualify to be XDG compliant.
xdg-open opens a file, including URLs, using the preferred applications. In short, you can type
xdg-open resume.odt and it opens up OpenOffice, or your preferred application, for you to edit the document. If you find
xdg-open to be cumbersome to type, create a symbolic link with your favourite command. For example, if I want to open files using the command
o, I do
ln -s /usr/bin/xdg-open /usr/local/bin/o
Now I type
o resume.odt or
o blog.py or
o http://ifacethoughts.net to open any of the corresponding applications and work on those files.
We can perhaps take this one step further by using command_not_found extension for bash to invoke the application by just typing in the file name, without having to worry about the application name at all.