Skip to content

Instantly share code, notes, and snippets.

@bmjames
Created April 19, 2015 10:23
Show Gist options
  • Save bmjames/b7503a166fdb4964df0c to your computer and use it in GitHub Desktop.
Save bmjames/b7503a166fdb4964df0c to your computer and use it in GitHub Desktop.
Open local haddocks for an installed package
#!/usr/bin/env sh
browser=chromium-browser
package=${1-base}
ghc-pkg describe $package | \
grep haddock-html | \
awk '{ print $2 "/index.html" }' | \
xargs $browser &> /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment