Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I want to be able to add an action to search Google with any selected text in Terminal. Any ideas?

share|improve this question
    
Do you want the Google search to be via curl in Terminal, or in a browser app? –  Daniel Lawson Nov 9 '11 at 4:35
add comment

2 Answers 2

up vote 1 down vote accepted

You could use the one that's built into iTerm2 … (which is a viable replacement for Terminal anyway, if you don't know it yet)

enter image description here

share|improve this answer
    
Yeah, thanks I just downloaded it! –  ennuikiller Oct 17 '11 at 18:43
add comment

You can enable the corresponding service in Preferences/Keyboard:

enter image description here

Default key assignment is Shift-Command-L which I had to change because it was already used by something else.

After enabling the service you can initiate a Google search in Terminal by selecting a text and - press the shortcut key - select the service in the context menu (Services/Search with Google)

Only drawback is that the search always opens Safari even if you have different default browser.

share|improve this answer
    
This doesn't seem to work with highlighted text in terminal –  ennuikiller Oct 22 '11 at 17:28
    
It definitively does for me: highlight/select text, right click, Services. –  patrix Oct 22 '11 at 19:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.