« | Main | »

November 14, 2009

search is a shortcut for using search plugins to open websites from your command line. The idea is that you pass it a search plugin name and query, and it will open a browser, searching the appropriate site for that query. For example, if I wanted to search google, but didn't want to enter the query into the input in the browser, I could type
  % search google mr potato head -v
  Finding plugin 'google'
  Searching searchplugins.net
  Opening http://www.searchplugins.net/pluginlist...
  Opening http://www.searchplugins.net/createos.as...
  Have plugin 'google'
  Opening http://www.google.com/search?hl=en&q=mr+...
  Writing alias to /Users/jeff/.profile
So, a couple things. A cache of the plugins is kept in ~/.searchdb so we don't have to look on the net everytime for the plugin. To clear this cache pass -c or -clean as paramters. To force a lookup instead of using the cache pass -f or -force as parameters. Secondly, if the plugin isn't in your path or alaised, this adds the alias plugin for 'search plugin', so instead of typing search plugin you can just type plugin. To explain what a plugin does, pass in -e or -explain, e.g.
  % search imdb -e
  Search IMDB
  % search google -e
  Search Google 100 results new window
And I just realized I had written something similar in nature (exact in URL, so it's lost). But that just used the ones in Firefox, this one uses any plugins. I still feel like a complete douche bag; even on top of doing this in the first place. It's cool, I made something interesting for death cubes earlier in the day. In doing so, I realized that there are many, many benefits to using your friends' mom's name as project names -- especially unfuddle messages.

unfuddle-mrs.png


Posted by jeff at November 14, 2009 11:49 PM