Install Homebrew package with all available options
Disclaimer: I'm not so familiar with grep. Smarter solutions are welcome.


You can list all options with this command.

brew options target_formula


And you can get all --with-* options with this.

brew options target_formula | grep 'with-'


So you can install a formula with all --with-* options by this.

brew install target_formula `brew options target_formula | grep 'with-'`


Note that some formula, especially in unofficial tap, can have old options not prefixed with --with- or --without.


EDIT:
If you want to exclude specific option, for example --with-zimg, you can do that with this.
(grep -v 'with-zimg' is fine, but grep -v 'zimg' is shorter)

brew install target_formula `brew options target_formula | grep 'with-' | grep -v 'zimg'`