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

autocomplete doesn't work on zsh #1826

Open
LuanVSO opened this issue Nov 2, 2024 · 5 comments
Open

autocomplete doesn't work on zsh #1826

LuanVSO opened this issue Nov 2, 2024 · 5 comments
Labels
Priority: LOW Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take

Comments

@LuanVSO
Copy link

LuanVSO commented Nov 2, 2024

zsh can't load dnf5 bash autocomplete causing it to use dnf4 autocomplete which causes problems specially with the remove command:

image

@m-blaha
Copy link
Member

m-blaha commented Nov 5, 2024

Thanks for reporting!
There indeed are several problem with completions/dnf5 script:

  • _init_completion does not exist in zsh environment
  • mapfile does not exist in zsh

The issue is valid and the completion needs to be adjusted to work in both environments.

@m-blaha m-blaha added Priority: LOW Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take labels Nov 5, 2024
@sebastian-de
Copy link

Completion with fish doesn't work with dnf5 either - is the same completion-script used for all shells?

@LuanVSO
Copy link
Author

LuanVSO commented Nov 5, 2024

on dnf4 there's a script for bash and a different one for zsh

@m-blaha
Copy link
Member

m-blaha commented Nov 8, 2024

Downstream issue: https://bugzilla.redhat.com/show_bug.cgi?id=2324465

@firewavemtl
Copy link

I tried very quickly to adapt _dnf to dnf5 but looks like the package_db somehow changed. We might do an intermediate sqlite file, as it was in the past (or present?) but it's not that great since dnf5 already manages a good db. I have to dig into dnf5 code to understand the support and structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: LOW Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take
Projects
None yet
Development

No branches or pull requests

4 participants