Browse files

Rename hoogle to hoogle-web.

There is a CLI to Hoogle with the same name.
  • Loading branch information...
1 parent 9b3c64e commit 93ea83cc6ba70ec481e8b94951452094cc453fc0 @tdudziak committed Jun 8, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 bin/{hoogle → hoogle-web}
View
7 bin/hoogle → bin/hoogle-web
@@ -2,13 +2,14 @@
import webbrowser
from sys import argv, exit
-from urllib import urlencode
+from urllib.parse import urlencode
def main():
- if len(argv) != 2:
+ if len(argv) < 2:
exit('Usage: %s <keyword>' % argv[0])
- url = 'http://haskell.org/hoogle?' + urlencode([('hoogle', argv[1])])
+ q = ' '.join(argv[1:])
+ url = 'http://haskell.org/hoogle?' + urlencode([('hoogle', q)])
webbrowser.open(url)
if __name__ == '__main__':

0 comments on commit 93ea83c

Please sign in to comment.