Skip to content

Instantly share code, notes, and snippets.

@ljcooke
Last active August 17, 2017 07:54
Show Gist options
  • Save ljcooke/3b887b65dc2dd03d1cb8c74b546a1f76 to your computer and use it in GitHub Desktop.
Save ljcooke/3b887b65dc2dd03d1cb8c74b546a1f76 to your computer and use it in GitHub Desktop.
Bash function to read a man page in your web browser.
function hman()
{
if [ $# -gt 0 ]; then
man $@ | man2html | bcat
else
man
return 1
fi
}

Read a man page in your default browser.

Dependencies:

$ brew install man2html
$ gem install bcat

To install, add the function to your .bashrc or similar file.

Usage example:

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