Skip to content

Instantly share code, notes, and snippets.

@mistydemeo
Created January 21, 2014 01:25
Show Gist options
  • Save mistydemeo/8532718 to your computer and use it in GitHub Desktop.
Save mistydemeo/8532718 to your computer and use it in GitHub Desktop.
Lists installed homebrew formulae, with options used to install them if applicable.
#!/bin/sh
formulae=$(brew ls)
for formula in $formulae; do
receipt="$(brew --prefix)/opt/$formula/INSTALL_RECEIPT.json"
options=$(jq < $receipt '.used_options[]' -r | tr "\n" " ")
echo "$formula $options"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment