How to use the address bar as a command line.

I’ve been wanting to code up something that turns the Firefox address bar into a command line. I’ve been making heavy use of the Firefox Smart Keywords feature since forever. They do pretty much all I want but editing them is not a lot of fun. This unfunnieness grows linerally with the number of computers you use for browsing and thus need to update. At some point you just give up doing it.
So what I wanted was something like Smart Keywords that could be maintained online. Googling this problem a while I stumbled upon YubNub and somehow I manged to miss that it does exactly what I want.
Instead I went out and bought a couple of domains and started fiddling with a Rails application to solve my problem. Whois tells me this all happened in June. First thing I did after buying those domains was fire up my spreadsheet to find out when my new Webb App would make me financially independent, probably sometime during Q3 2007. Guess that wasn’t soon enough for me ’cause I sill haven’t written the application.
Recently I found out about the keyword.url Firefox config variable, and realized that it would save me from writing a Firefox plugin for my Web App, then I realized that I could use it for YubNub and save myself the trouble of writing my app in the first place.
This is how you do it:
- Type in about:config in the Firefox address bar.
- Enter “keyword.url” in the filter field.
- Select keyword.URL, right click and select modify.
- Change the value to http://yubnub.org/parser/parse?command=
That’s it. You can now reach all YubNub commands from the address bar. Of course always use Ctrl-L (instead of using the mouse) to position the cursor at the address bar. The address bar hack doesn’t sit to well with zero argument commands so instead of ls you’ll want to type ls . Other than that it’s pretty straight forward
g is for google y is for yahoo wp is for wikipedia and so on..
One thing that bugs me about YubNub is that you share the command namespace with all other users. I’d like to tie wp to a Wikipedia search through Google instead of using the default Wikipedia search. Instead I had to opt for wgoog, the best command name I could come up with that wasn’t taken. So I might still write that application after all. In that case financial independence will be achived during Q1 2008.
update: Further googling reveals that Yahoo provides a similar service: Open Shortcuts. I’ll be playing around with that for a couple of days. One benefit I notice already is the ability to override default keywords with definitions of your own. The set of ready made commands is a bit limited though.
Set keyword.URL to http://search.yahoo.com/search?p=
update: I’m still using Yahoos service. But it really sucks. Every now and then it’ll give me a “Sorry we’re experiencing some problems now please try again later”. If that only happened on one search in a thousand it would be alright but now it’s more like one in ten. It really baffles me that a giant like Yahoo is putting something that half baked out there.
update 2008-05-20: I’m still using this hack on a daliy basis. Yahoos service has gotten a lot more stable. Can’t remember last time I had any difficulties with it.
0 Responses to “g is for google”
Leave a Reply