#!/bin/csh -f # Note: Use "o" instead of "open" to deal better with spaces. set browser = "o" # If $1 is a script in the browsers folder, use it as the browser. if ($#argv > 0 && -x "$0:h/browsers/$1") then set browser = $1:q shift endif if ($#argv == 0) then echo "$browser http://google.com" $browser http://google.com else echo "$browser http://google.com/search?q=$1:q+$2:q+$3:q+$4:q+$5:q+$6:q+$7:q+$8:q+$9:q+$10:q+$11:q+$12:q+$13:q+$14:q+$15:q+$16:q+$17:q+$18:q+$19:q+$20:q" $browser "http://google.com/search?q=$1:q+$2:q+$3:q+$4:q+$5:q+$6:q+$7:q+$8:q+$9:q+$10:q+$11:q+$12:q+$13:q+$14:q+$15:q+$16:q+$17:q+$18:q+$19:q+$20:q" endif