Skip to content

Instantly share code, notes, and snippets.

@avit
Created November 15, 2010 03:16
Show Gist options
  • Save avit/676376 to your computer and use it in GitHub Desktop.
Save avit/676376 to your computer and use it in GitHub Desktop.
zsh function: Launch man pages in browser if available
# loaded by .zshrc
# Load man pages with Bwana
# requires http://www.bruji.com/bwana/
if [[ -z $SSH_CONNECTION ]]; then
USE_BWANA=`/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump | grep 'bindings:\W*man:'`
fi
# in $fpath/man
# requires http://www.bruji.com/bwana/
if [[ -n $USE_BWANA ]]; then
open man:$1
else
/usr/bin/env man $1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment