wget https://raw.githubusercontent.com/Homebrew/formula-patches/c1d87451da3b5b147bed95b2dc783a1b02520ac5/bash-completion/bug-740971.patch echo 'Creating brew-patch.diff' cat << EOF >> brew-patch.diff --- a/completions/man +++ b/completions/man @@ -27,7 +27,7 @@ fi uname=$( uname -s ) - if [[ $uname == @(Linux|GNU|GNU/*|FreeBSD|Cygwin|CYGWIN_*) ]]; then + if [[ $uname == @(Darwin|Linux|GNU|GNU/*|FreeBSD|Cygwin|CYGWIN_*) ]]; then manpath=$( manpath 2>/dev/null || command man --path ) else manpath=$MANPATH EOF