updates BrewInfo cask commands to use --cask flag
The brew cask info and brew cask cat commands are disabled in recent homebrew versions. This replaces them with brew info --cask and brew info [--formula|--cask] --json=v2.
@zzamboni could you take a look at this one?
@cmsj happy to do so!
@samdfonseca thanks for the PR, I had been meaning to look into this.
First of all, please note that your PR includes changes to a few extraneous files, these should be removed.
A few comments with respect to the BrewInfo patch itself:
- My main observation is that with the new versions, it is not really necessary to have different entry points for Formulae and Casks, since the
infocommand works the same for both of them. In fact, in my own configuration I have disabled the Cask hotkeys and use now the Formula hotkeys for both Formulae and Casks. - I see you have modified the command to use JSON output, which is nice, but this also works without having to specify
--caskor--formula, so the commands can again be unified.
Overall I see a chance to significantly simplify the code based on the recent Homebrew changes.
If you want to take a stab a it I'd be happy to take a look.
@zzamboni perhaps we should pull out the cask specific changes into a new PR? If so, do you want to do that? If not, I can.
@cmsj I'll take it - I've been meaning to take a look at it anyway. Thanks for the ping!