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

Add brew drop command #3

Closed
2 tasks done
superatomic opened this issue Jun 7, 2022 · 3 comments · Fixed by #7
Closed
2 tasks done

Add brew drop command #3

superatomic opened this issue Jun 7, 2022 · 3 comments · Fixed by #7
Assignees
Labels
enhancement New feature or request

Comments

@superatomic
Copy link
Owner

superatomic commented Jun 7, 2022

The brew drop [FORMULA|CASK...] command should remove a formula and/or cask from a Brewfile.

It will function as the opposite of the brew install and brew add relationship, being the equivalent of brew uninstall, but simply removing formulae, casks, and taps from a Brewfile instead of uninstalling them.

Previous content and additional discussion is in #1. This includes @boldandbrad's amazing idea to name the command brew drop.

Additionally, for when #4 is implemented, this command should also be able to remove mas app lines.

Important questions:

  • Should comments on the same line as the formula/cask be removed as well? Yes
  • Should regular expressions be used, or should the entire Brewfile be parsed into tokens? Regular expressions
@boldandbrad
Copy link
Contributor

boldandbrad commented Jun 7, 2022

  • Should comments on the same line as the formula/cask be removed as well?

I think yes by default. I don't think I'd want to manually cleanup comments - kinda defeats the purpose. Also, I know many people commit their Brewfile to git, so history would be preserved if they needed to revert or check changes before commit.

For those who want to keep comments we can add an optional flag to the drop command.

@superatomic
Copy link
Owner Author

I should be able to start working on implementing this on June 9th.

@superatomic superatomic self-assigned this Jun 9, 2022
@superatomic
Copy link
Owner Author

It's definitely possible to do, but I've been running into a bit of trouble with parsing mas arguments as described in #4 so that they can also be removed. I'm also not going to be able to write more code for a few days soon, so this feature and #4 might take a bit longer than expected for me to implement.

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

Successfully merging a pull request may close this issue.

2 participants