Skip to content

Instantly share code, notes, and snippets.

@jship
Created May 15, 2022 21:24
Show Gist options
  • Save jship/0e7d9c951cc305a5bcf015eed83309a4 to your computer and use it in GitHub Desktop.
Save jship/0e7d9c951cc305a5bcf015eed83309a4 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -o errexit
set -o pipefail
[[ "${DEBUG}" == 'true' ]] && set -o xtrace
declare -r package="$1"
if [ -z "$package" ]
then
echo "Must pass in package!"
exit 1
fi
$(stack haddock --open "$package" 2>&1 | grep Opening | tr '/' '\\' | awk '{printf "explorer.exe \\\\wsl$\\Ubuntu%s", $2}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment