Order of arguments/options in Homebrew

Order of arguments/options in Homebrew

I came across this comment on Super User and wanted to see which was the correct order of arguments for brew

Is it
brew install --option formula or brew install forumla --option?

https://trac.ffmpeg.org/wiki/CompilationGuide/MacOSX has the options listed as brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-libass --with-libquvi --with-libvorbis --with-libvpx --with-opus --with-x265 and was last modified on the 1st of March 2016.

However brew(1) from man shows:

NAME
       brew - The missing package manager for OS X

SYNOPSIS
       brew --version
       brew command [--verbose|-v] [options] [formula] ...

But http://wikemacs.org/wiki/Installing_Emacs_on_OS_X again shows the order as brew install emacs --with-cocoa

I guess the bigger question is does it matter what order the options are?

I recently installed emacs with brew install emacs but I actually wanted emacs with –with-cocoa.

So lets try it:

$ brew install --with-cocoa emacs
==> Downloading http://ftpmirror.gnu.org/emacs/emacs-24.5.tar.xz
Already downloaded: /Library/Caches/Homebrew/emacs-24.5.tar.xz
==> ./configure --disable-silent-rules --enable-locallisppath=/usr/local/share/e
==> make
==> make install
==> Caveats
A command line wrapper for the cocoa app was installed to:
  /usr/local/Cellar/emacs/24.5/bin/emacs

To have launchd start emacs now and restart at login:
  brew services start emacs
Or, if you don't want/need a background service you can just run:
  emacs

.app bundles were installed.
Run `brew linkapps emacs` to symlink these to /Applications.
==> Summary
🍺  /usr/local/Cellar/emacs/24.5: 3,923 files, 109.8M, built in 1 minute 27 seconds

Ok cool it worked, now lets try the other way round:

$ brew install emacs --with-cocoa
==> Downloading http://ftpmirror.gnu.org/emacs/emacs-24.5.tar.xz
Already downloaded: /Library/Caches/Homebrew/emacs-24.5.tar.xz
==> ./configure --disable-silent-rules --enable-locallisppath=/usr/local/share/e
==> make
==> make install
==> Caveats
A command line wrapper for the cocoa app was installed to:
  /usr/local/Cellar/emacs/24.5/bin/emacs

To have launchd start emacs now and restart at login:
  brew services start emacs
Or, if you don't want/need a background service you can just run:
  emacs

.app bundles were installed.
Run `brew linkapps emacs` to symlink these to /Applications.
==> Summary
🍺  /usr/local/Cellar/emacs/24.5: 3,923 files, 109.6M, built in 1 minute 26 seconds

Conclusion: Both ways work fine

P.S. If you are installing Emacs on Mac checkout my post about getting it working with Spotlight.

Leave a Reply

Your email address will not be published. Required fields are marked *