Created
November 15, 2010 03:16
-
-
Save avit/676376 to your computer and use it in GitHub Desktop.
zsh function: Launch man pages in browser if available
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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