Skip to content

Instantly share code, notes, and snippets.

@avielsh
Created January 31, 2020 23:02
Show Gist options
  • Save avielsh/3f7340c0e6b501d224a74fc8533e345a to your computer and use it in GitHub Desktop.
Save avielsh/3f7340c0e6b501d224a74fc8533e345a to your computer and use it in GitHub Desktop.
Search google from the cli. the simplest script possible!
#Search in google for whatever arguments. if no arguments use the clipboard
goog() {
url='https://www.google.com/search?q='
for i in "$@"
do
open "${url}${i}"
done
if [[ $# -eq 0 ]];
then
open ${url}$(pbpaste)
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment