« | Main | »

March 01, 2008

search is an updated version of the command-line search plugin search. This will search your Firefox search plugins and allow you to specificy a query on the command line. First, it only works on Macs, since I'm on a mac right now. Secondly, here's how you use it:
  1. If you pass it no arguments, you'll be prompted to choose a search engine and then give search terms, e.g.
    jeff$ ./search
    [1] amazondotcom     Amazon.com       
    [2] answers          Answers.com      
    [3] creativecommons  Creative Commons 
    [4] eBay             eBay             
    [5] google           Google           
    [6] yahoo            Yahoo            
    Please choose an engine > 6
    Input search terms> asdf
    Using Yahoo with url 'http://search.yahoo.co...'      
        
    Then you'll do a search for http://search.yahoo.com/search?ei=UTF-8&p=asdf%0A.
  2. If you give one argument it is a regular expression describing the search engine, e.g.
    jeff$ ./search yahoo
    Input search terms> asdf
    Using Yahoo with url 'http://search.yahoo.co...'
    
  3. If you give more than one argument, the first is treated like a regular expression for the search engine and rest are search terms, e.g.
    jeff$ ~/Sites/code/search yahoo asdf
    Using Yahoo with url 'http://search.yahoo.co...'
    
Posted by jeff at March 1, 2008 03:38 PM