Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

rjbs (4671)

  (email not shown publicly)
AOL IM: RicardoJBSignes (Add Buddy, Send Message)
Yahoo! ID: RicardoSignes (Add User, Send Message)

I'm a Perl coder living in Bethlehem, PA and working Philadelphia. I'm a philosopher and theologan by training, but I was shocked to learn upon my graduation that these skills don't have many associated careers. Now I write code.

Journal of rjbs (4671)

Thursday January 13, 2005
10:10 AM

firefox quick searches

[ #22697 ]

At the LUG meeting on Tuesday, I saw that Brian R. was using the Google bar in Firefox. It's 2005 and people are still using the Google bar! The guy giving the presentation had the default Google widget still on his address bar. Why is that damn thing still there?

Because people don't know about quick searches and keywords. I've mentioned them before, but only in the context of importing to them from OmniWeb. Here's an explanation for Brian and everyone else who's wasting time with trivial search plugins to Firefox.

Go visit Google and search for something. I'm going to search for "rjbs" because I'm egotistical. Google generates this URI for the search:

It says "search for the query 'rjbs' with the input and output encoded in UTF-8." (I have notes on all of the parameters, but more on that another day.)

I'll be really egotistical, now, and bookmark that search. I'll hit Ctrl-D (I could just go to the Bookmark menu and take "Bookmark this page" but I don't like clicking) and then click OK to save the bookmark.

Now, when I'm curious about what's going on with my name, I can go click that bookmark. Of course, that's sort of silly, so I can take that bookmark and make it more useful. In the Bookmarks Manager (in the Bookmark menu) I can find that bookmark and bring up its properties. Here, I see more fields than there were before, including one called "keyword." If I give a bookmark a keyword, I can use that word to open it.

So, if I wanted to make this bookmark sillier, I could give it the keyword "rjbs" and then just type "rjbs" into the address bar. It would open this bookmark.

I'm going for /less silly/, though, so I'm going to make this sort of an abstract bookmark. In the Location field, I'll replace "rjbs" with "%s" so the Location looks like this:

I'll give the bookmark the keyword "g". If I type "g" into the address bar, now, it searches for "%s" -- a pretty useless search. The magic is that I can type more /after/ the "g" in the address. So, to search for myself, I go to the address bar and type "g rjbs". Firefox replaces the magic "%s" in the Location field of the bookmark with everything after the space after "g" and that turns it into a search for rjbs.

I can type "g hot pants" or "g mini" and get those searches.

So far, this saves you no keystrokes. Now you're hitting Ctrl-L, g, space to Google instead of Ctrl-L, tab to get to the Google box. The great thing is that this is obviously not a Google-only approach. I don't need some goofy drop-down with my search engines, either. I just need more bookmarks. Here are some that I like:

    keyword: imdbt
    purpose: "imdbt Stripes" finds IMDB data on the Murray/Ramis classic
    keyword: dist
    purpose: "dist Rubric" finds the information on my Rubric package
    keyword: nf Hackers
    address:     purpose: lets me find and enqueue a movie with Angelina Jolie's boobs

I keep all my search bookmarks on my site for future reference; they might be helpful examples:

These are generated from my ow5sh script, using my OmniWeb shortcuts, which are like Firefox's quick searches. That script is also around:

Basically, if you search someplace often, or use a well-defined URI structure often, you can turn your typing into one of these quick searches and save yourself a lot of time. Google barring is so 2001.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • I also use the imdb trick, that's very convenient.

    But the Google bar also has other buttons like "Up one level". That sounds trivial, but it's somewhat useful when you have the hand on the mouse and don't want to fiddle with selecting the url text, deleting the correct part, etc.

    Also, more importantly, I have configured the Google bar to search-this-site (with the current site) when I press Ctrl-Return. Is that possible with the bookmark approach?
    • Up one level and search-this-site should be simple-ish with JavaScript. Make the bookmark a redirect to Google that, to build the redirect, takes the current location, yanks the site, and puts it after site:

      Not nothing, but not complex. I'm on a 12" PowerBook, so I don't like giving up space for the googlebar and its minions.
  • You aren't being lazy enough, with that manual URL hacking!

    Simply go to Google (or wherever), right-click on the textbox (or press Shift+F10) and choose 'Add a Keyword for This Search ...'.

    Note that it even takes into account the current state of other controls that are part of the form, such as the radio buttons on per-country Google pages.

  • I don't have the Google bar, but I do use search box [] that has Google defined as the default. That way, it's only a Ctrl-K keystroke away and it keeps a history of what I've searched.

    I do use the keyword search for cpan and, though ... only b/c I'm not sure if there's a keystroke to switch engines in the search box.

    M-W Dictionary:
    Keyword: dict

    CPAN Search:
  • Hey rjbs, You probably want to check out . It's a page dedicated to firefox quick searches. Html seems to be broken now but you can still rip the links. Someday I'll put my own up. I got a list about the same size.