Skip to content

Commit

Permalink
Update baidu.sh
Browse files Browse the repository at this point in the history
make it work when more than 1 word is input for searching with baidu.
  • Loading branch information
YYRancho authored Aug 14, 2016
1 parent 49745f7 commit ccfb249
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/script/baidu/baidu.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#!/bin/bash
echo '{"Name":"'$1'","Icon":"../../script/baidu/baidu-icon.png","Exec":"xdg-open http://www.baidu.com/s?wd='$1'","Comment":"百度搜索 '$1'"}'
url="http://www.baidu.com/s?wd=$*"
url=${url// /%20}
echo '{"Name":"'$*'","Icon":"../../script/baidu/baidu-icon.png","Exec":"xdg-open '$url'","Comment":"百度搜索 '$*'"}'

0 comments on commit ccfb249

Please sign in to comment.