FS#23322 - zsh autocompletion no longer works with pacman 3.5

Attached to Project: Pacman
Opened by Daniel Micay (thestinger) - Friday, 18 March 2011, 08:03 GMT
Last edited by Allan McRae (Allan) - Monday, 21 March 2011, 13:22 GMT
Task Type Bug Report
Category General
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version 3.5.0
Due in Version 3.5.1
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Summary and Info:
The completion file shipped with pacman 3.5 doesn't work with the new tar sync database.

The pacman upgrade leaves behind the old extracted sync databases, so completion still appears to work at first, but new packages aren't included. Fresh installs won't have the extracted databases.

Steps to Reproduce:
remove old sync database (/var/lib/pacman/sync)
pacman -Syy
pacman -S f<TAB>

Notes:
A quick skim through the file makes it clear that it hasn't been updated for a while (at least since -D was added to pacman).

I might get around to fixing this and submitting a patch, but it doesn't bother me right now because I rarely install new stuff :P.
This task depends upon

Closed by  Allan McRae (Allan)
Monday, 21 March 2011, 13:22 GMT
Reason for closing:  Fixed
Additional comments about closing:  git commit c3e72e11
Comment by Dan McGee (toofishes) - Sunday, 20 March 2011, 16:04 GMT
Patches welcome on this- I don't think any of the primary devs use zsh, unfortunately.

If you do a `git log --follow contrib/bash_completion.in` you should get an idea of the changes we made to that file to bring it up to speed.
Comment by Allan McRae (Allan) - Monday, 21 March 2011, 04:10 GMT
Can you please test these changes?
Comment by Allan McRae (Allan) - Monday, 21 March 2011, 04:51 GMT
OK... I tested this one and it actually works! At least "pacman -S <tab>", "pacman -S co<tab>", "pacman -S core/<tab>" and "pacman -S core/pac<tab>" all give the expected results.
Comment by Lukas Fleischer (lfleischer) - Monday, 21 March 2011, 11:34 GMT
`pacman -S $repo/<TAB>` completion does not work for me. Attached a fixed patch.
Comment by Allan McRae (Allan) - Monday, 21 March 2011, 11:53 GMT
Thanks Lukas. You version is on my working-maint branch ready to be pulled for pacman-3.5.1.

Loading...