Last active
November 26, 2015 04:44
-
-
Save hackugyo/076bbd722b5e8be3fa15 to your computer and use it in GitHub Desktop.
パイプもしくは引数でI'm feeling luckyする。.bashrcに書いてexec bash; /bin/bash --login してくれ
This file contains hidden or 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
| gsearch_d () | |
| { | |
| ( if [ -p /dev/stdin ]; then | |
| a=$(cat -); | |
| else | |
| a=$@; | |
| fi; | |
| argv=("$a"); | |
| str="$(echo -n $argv | nkf -wMQ | sed 's/=$//g' | tr = % | tr -d "\n")"; | |
| open https://www.google.co.jp/search?btnI'&'q="$str" & exit ) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment