Skip to content

Instantly share code, notes, and snippets.

@amadamala
Created June 6, 2011 18:25
Show Gist options
  • Save amadamala/1010771 to your computer and use it in GitHub Desktop.
Save amadamala/1010771 to your computer and use it in GitHub Desktop.
Google from Terminal
# Add following snippet to your ".bash_profile" to google from the terminal.
# google from Terminal
google() {
python -c "import sys, webbrowser, urllib; webbrowser.open('http://www.google.com/search?' + urllib.urlencode({'q': ' '.join(sys.argv[1:]) }))" $@
}
# Usage: $ google recursion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment