Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
`man` replacement for git bash on windows
# - `man` replacement for git bash on windows
# Dependencies (outside of git bash):
# wget (
# use sed to remove <head> & tags, convert HTML entities
# Notes:
# `sed -r` = allows gnu regex extensions (like +)
# `wget -qO -` = non-verbose output, returned file to stdout instead of file
if [ $# -eq 0 ] ; then
echo "No command specified to get man page for"
exit 1
# The extra `+` at the end of the querystring doesn't hurt
for arg in $@ ; do
wget -qO - $url | less
Copy link

cwillig commented May 28, 2015

Considering that this command will also pull HTML tags, try the following instead of just piping to less:
wget -qO - $url | sed 's/<[^>]*>//g' | less

sed command courteous of stackoverflow.

Copy link

@lkptrzk, all TODO items have been completed in this fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment