Created
January 31, 2020 23:02
-
-
Save avielsh/3f7340c0e6b501d224a74fc8533e345a to your computer and use it in GitHub Desktop.
Search google from the cli. the simplest script possible!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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