Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save baldwicc/486a47ed4adb94357745 to your computer and use it in GitHub Desktop.
Save baldwicc/486a47ed4adb94357745 to your computer and use it in GitHub Desktop.
# Short of learning how to actually configure OSX, here's a hacky way to use
# GNU manpages for programs that are GNU ones, and fallback to OSX manpages otherwise
# Borrowed from https://gist.github.com/quickshiftin/9130153
if which brew &> /dev/null; then
if brew list | grep coreutils &> /dev/null; then
alias man='_() { echo $1; man -M $(brew --prefix)/opt/coreutils/libexec/gnuman $1 1>/dev/null 2>&1; if [ "$?" -eq 0 ]; then man -M $(brew --prefix)/opt/coreutils/libexec/gnuman $1; else man $1; fi }; _'
fi
fi
@baldwicc
Copy link
Author

baldwicc commented Oct 1, 2014

Added a quick check to see if brew and coreutils are actually installed

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