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
Suppress "completion installed" text in Caveats #16897
Comments
Looks like for detection if it has been run in the current shell could be by inspecting |
@jubr Can you investigate this more? If we can automatically detect if this message is redundant I agree it may make sense to remove these messages.
Going from "no configuration" to "four different settings" feels excessive. Let's focus on the problem to be solved for now and we can figure out what's best based on what's e.g. possible from the shell. |
I don't think that is available in Some tricky parts for shell detection:
From quick glance, a If so, the options would then be a full opt out flag or maybe some sort of show-once-per-formula if we could store info in tab. |
Another potential option here: given it looks like detection is not really possible maybe these could just be output a single time regardless of how many formulae are installed/upgraded at the end of all installations? |
I just stumbled upon this issue and would like to express my opinion: as a Homebrew user, I really like when I I agree with #2110 that "Caveats" is not maybe the best place for it, though. |
Provide a detailed description of the proposed feature
In followup of #2110, I'd like to suggest to make the Caveat output less chatty in regard to the shell completions output.
Initially this could be opt-in behind an env var in the direction of
HOMEBREW_CAVEAT_COMPLETIONS
with future values likesuppress
,show
,suppress-when-detected-in-shell
.These could be implemented incrementally, with immediate value for advanced users aware of this env var in
suppress
.The next iteration could then add a heuristic to detect if
/opt/homebrew/etc/profile.d/*_completion.sh
has been run, which would provide the needed input forsuppress-when-detected-in-shell
. Checking it has been run would be a better heuristic than looking in~/.*rc
or~/.*profile
, since you never know how people might source their shell configs.What is the motivation for the feature?
I'm noticing that during a large
brew upgrade
that all the potentially important Caveats are being drowned out by these:And since I already have the completions enabled for my shell via Shell-Completion I'd like to have an option to suppress them. Or perhaps even have them suppressed automatically, based on detection.
How will the feature be relevant to at least 90% of Homebrew users?
People have a smaller wall of text to parse after a
brew upgrade
, so basically make our lives a litte more efficient.Reaching ~90% would only be possible if
HOMEBREW_CAVEAT_COMPLETIONS=suppress-when-detected-in-shell
would be out-of-the-box, with opt-out available for distro's and people in the form ofHOMEBREW_CAVEAT_COMPLETIONS=show
.What alternatives to the feature have been considered?
I've though about running
brew
s output throughgrep
withHOMEBREW_COLOR=true
, which I might invest time into if this request is shot down hard 😛.C'mon fellow stumblers, go for 👍 on my request if you think it makes sense. Jurgen out.
Yes, yes, yes
Verification
brew install wget
. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.The text was updated successfully, but these errors were encountered: