Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What's the best way to execute brew install + brew add and brew uninstall + brew drop together? #17

Open
carpet-stain opened this issue Jun 21, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@carpet-stain
Copy link

Hi,

Looking to create a setup in which I can leverage one command and execute both install + add and another command to execute uninstall + drop together?

What's the best way to accomplish this?

@superatomic
Copy link
Owner

superatomic commented Jun 22, 2024

Perfect timing! I actually have an unpushed setup for this very thing that I've been testing for months now. I'll tidy it up and push the feature soon. The current (as of now unpublished) syntax is brew add -U and brew drop -U, with -U being short for --update. I've been thinking about renaming the option to --sync, however (I would love to hear your thoughts).

@superatomic superatomic self-assigned this Jun 22, 2024
@superatomic superatomic added the enhancement New feature or request label Jun 22, 2024
@carpet-stain
Copy link
Author

carpet-stain commented Jun 22, 2024

Perfect timing! I actually have an unpushed setup for this very thing that I've been testing for months now. I'll tidy it up and push the feature soon. The current (as of now unpublished) syntax is brew add -U and brew drop -U, with -U being short for --update. I've been thinking about renaming the option to --sync, however (I would love to hear your thoughts).

Love it! I appreciate the work. Thank you.

EDIT: As far as how the syntax would work, I would vote for brew add -S or brew add --sync. Similarly, it would be brew drop --sync. As far as an enhancement to this flow, would it be too much work to set the -S, --sync flag to always ask for confirmation for the location of the Brewfile you want to sync if neither the --file, --global, or $HOMEBREW_BUNDLE_FILE variables are set/passed too as well as asking the user to confirm the -S, --sync action with a [Y]es, [N]o interaction if they are set?

This interaction could be bypassed by passing -Y, --yes flag for a one-command solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants