Skip to content

Instantly share code, notes, and snippets.

@bbuck
Forked from lkptrzk/man.sh
Last active November 24, 2015 19:21
Show Gist options
  • Save bbuck/6f68dfd38b944166bc1f to your computer and use it in GitHub Desktop.
Save bbuck/6f68dfd38b944166bc1f to your computer and use it in GitHub Desktop.
`man` replacement for git bash on windows
#!/bin/sh
# man.sh - `man` replacement for git bash on windows
# Dependencies (outside of git bash):
# curl (already available in git bash)
# Notes:
# `curl s` = non-verbose output
#
if [ $# -eq 0 ] ; then
echo "No command specified to get man page for"
exit 1
fi
url="http://man.he.net/?section=all&topic="
# The extra `+` at the end of the querystring doesn't hurt
for arg in $@ ; do
url=$url$arg"+"
done
curl -s $url | sed 's/<[^>]*>//g' | less
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment