[TxMt] a better google search command

Allan Odgaard allan at macromates.com
Fri Dec 31 12:24:57 UTC 2004


On Dec 31, 2004, at 7:13, Lang Riley wrote:

> here is a better google search command that escapes spaces and uses 
> highlighted text rather than the current word:
>
> open http://www.google.com/search?q=`echo $TM_SELECTED_TEXT | sed 's/ 
> /+/g'`

Here's a neat bash-trick:
    open http://www.google.com/search?q=${TM_SELECTED_TEXT// /+}

Will substitute spaces with + for the selected text also.




More information about the textmate mailing list