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
Bash completions: cache names of 'doctor' checks #14507
Bash completions: cache names of 'doctor' checks #14507
Conversation
Review period will end on 2023-02-07 at 00:00:00 UTC. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, as-is I think brew generate-man-completions
will overwrite these changes. You might be able to edit the generation code in Completions
to get this to work, but tbh it's been a really long time since I've looked at these so I don't remember the intricacies that well anymore.
I suggest to improve Bash completions first (e.g., cache completions) and then, if either one of us gets to $ brew generate-man-completions -vd
Writing markdown to /opt/homebrew/docs/Manpage.md
Error: Broken pipe |
Sorry, we're not going to merge something that's going to get immediately reverted by an automated PR. |
Oh, so changes made to Bash completions are not going to persist unless they're implemented in (some other) files that generate them. This makes me suspect that changes I made in #14467 will be overwritten the next time Bash completions are updated. |
Yeah, looks like it was removed in #14513 |
That was fast :/ OK, I'll look for a proper place to implement these changes. The fact that |
Converting to a draft for now as more changes are needed |
Review period ended. |
@maxim-belkin what's the latest here? |
6eac9f5
to
d3da5a3
Compare
Thanks for the reminder, @MikeMcQuaid. PR is ready for your and @Rylan12's review. I also fixed syntax of the |
Thanks @maxim-belkin! Unfortunately looks like some legit/related test failures here. |
9098f9f
to
5382774
Compare
Yep. I fixed one test yesterday but didn't notice the other one a few lines of code down. |
Thanks again @maxim-belkin! |
Thanks for merging it in, Mike! |
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?I propose to cache names of
brew doctor
checks the first time the list of the checks is obtained. Also, reuse_brew_doctor
function forbrew dr
(and, hence, remove_brew_dr
function which is a duplicate of_brew_doctor
).It seems that some work has been done for Bash completions to be generated "automatically" using
brew generate-man-completions
. Not sure how this PR is going to affect that effort, so tagging in @Rylan12.