buo / homebrew-cask-upgrade

A command line tool for upgrading every outdated app installed by Homebrew Cask
MIT License
2.4k stars 90 forks source link

[FR]Verbosity levels #183

Open yurikoles opened 3 years ago

yurikoles commented 3 years ago

It would be nice to be able to use common CLI tools approach to adjust verbosity level, so -v will produce output as it was before #164, -vv/-v -v/--verbose --verbose will be same as current behavior with -v.

ondrejfuhrer commented 3 years ago

Hey @yurikoles , thanks for your suggestion. I'm just wondering, what exactly you would like to change? Is that regarding the added statements regarding metadata folder, etc or the version string?

yurikoles commented 3 years ago

The problem is that after #164 we need to specify -v to see such information like the full version of app, including what is after coma. But this option is also making underlying brew commands verbose.

yurikoles commented 3 years ago

So now we have two options: default quiet mode and with -v, that returns previous nice output of cu with summary, but also a lot of brew output. My request is to have some third option. Which may also be solved by #184, e.g.: brew cu -v vs. brew cu -- -v

ondrejfuhrer commented 3 years ago

Thx @yurikoles for the explanation, now I get it 🙂 There are few things I'm not sure about and which makes me hesitant about jumping onto it right now.

Basically -v currently does 2 things

  1. adding more verbose output of cu command itself
  2. passing -v flag down to all brew commands (also that's a not for #184 - were use multiple brew commands therefore It's not entirely clear to which one we should pass it or not, if that is not a "generic" flag like --verbose)

So basically your suggestion is to have a way of splitting those 2 things.

The problem is that after #164 we need to specify -v to see such information like the full version of app, including what is after coma. But this option is also making underlying brew commands verbose.

This is to simply execute the 1.

Which may also be solved by #184, e.g.: brew cu -v vs. brew cu -- -v

This is to simply execute the 2.

My main question is: Is that really a problem? Or what Kind of use case you're trying to solve?

In order to solve it my tendency right now would be to have -v and -vv options, just I'm not sure if that wouldn't be confusing from the user perspective, changing the behaviour from "passing down the verbose command" to "passing down --verbose option when very verbose output is requested". Also considering that brew adds something like very verbose then it would be completely out of sync. 🤔