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

Speed-up bash completion by using sql cache again #1100

Closed

Conversation

m-blaha
Copy link
Member

@m-blaha m-blaha commented May 31, 2018

We already maintain this sqlite cache by generate_completion_cache plugin.

@j-mracek
Copy link
Contributor

j-mracek commented Oct 5, 2018

I am sorry, but it looks like that it doesn't work. Please can you provide a test case?

@lukash
Copy link
Contributor

lukash commented Mar 7, 2019

Doesn't work for me either. Nothing happens when pressing tab while completing either a command or a package name. Tried to debug it a bit, it may be returning after _init_completion returns 1 but I was getting some mixed results, so not sure...

summary-updateinfo swap system-upgrade update updateinfo update-minimal update-to
upgrade upgrade-minimal upgrade-to versionlock whatprovides
"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is supposed to be added in the previous commit and then removed here.

@m-blaha
Copy link
Member Author

m-blaha commented Mar 8, 2019

I'd like to rework the bash completion completely from the scratch. Basically, all commands and options should be generated from the argument parsers and not read from the bunch of hardcoded lists. Probably the best solution would be to close this PR and start a new one (which can hopefully cover also plugins instead of #1102)

@lukash
Copy link
Contributor

lukash commented Mar 8, 2019

Basically, all commands and options should be generated from the argument parsers and not read from the bunch of hardcoded lists.

This came across my mind 😄 really curious how you'd do it (or perhaps there already is some infra in the argument parser to pull these from it?).

Up to you then, if you don't want to continue with this just close the PR. If you're confident you'll make the argparser way work and will have a better solution for the plugins too, I guess close the #1102 as well.

Thanks!

@rh-atomic-bot
Copy link

☔ The latest upstream changes (presumably f68dcb2) made this pull request unmergeable. Please resolve the merge conflicts.

We already maintain this sqlite cache by generate_completion_cache plugin.
- removed abbreviation, they are not used by dnf any more
- removed hardcoded list of commands
@Foldex
Copy link

Foldex commented Oct 31, 2020

Just wanted to chime in, having noticed very slow bash completions myself and as this seems to be a fairly commonly reported issue:
1 2 3
Obviously other shells rolling their own completion are unaffected, but as bash is the default, it certainly impacts the OOTB usability.

@m-blaha had mentioned a possible rewrite of the bash completion which would warrant putting this off, but as that was some time ago I'm not sure of the status of it.

I did pull the branch down and it seems to still merge with master and function as intended. Are there any outstanding considerations that need to be addressed?

@m-blaha
Copy link
Member Author

m-blaha commented Apr 27, 2022

Closed in favor of #1817

@m-blaha m-blaha closed this Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants