Description of problem:
Not sure why this is the case, but coming from Ubuntu I've always felt that the tab completion while using yum was slower than what I was used to with apt-get in Ubuntu. I just installed two fresh vms of F16 and 11.10 and compared auto-completing similar commands and it is the case that Fedora is slower.
In Ubuntu getting a list of packages happens immediately (as I press tab a second time), while in Fedora there's hesitation, sometimes to the point that I feel compelled to double tap again, in case it missed my command.
Not sure if this is a bash-completion thing or a difference between yum and apt, but I figured I'd note it in a BZ, as I wish it was more responsive in Fedora.
Version-Release number of selected component (if applicable):
Fedora - bash-completion-1.3-6.fc16.noarch
Ubuntu - bash-completion-1:1.3-1ubuntu6
Steps to Reproduce:
1. In Ubuntu vm, type sudo apt-get install libre (tap tab twice), see "Display all 246 possibilities? (y or n)"
2. In Fedora vm, type yum install libre (tap tab twice), see "Display all 128 possibilities? (y or n)"
Ubuntu figures out what's available and gives feedback faster than Fedora
That Fedora tab completion is as fast as Ubuntu
This is noticeable on misses as well, Fedora has to think for a bit to determine that you're trying to tab complete something that doesn't exist, and you lose the ability to interact with the terminal until it finishes, whereas it doesn't seem like Ubuntu has that extra processing time and if it fails, you can alter your string immediately after the attempt, instead of waiting for a second or two. For the purposes of this comparison, I typed in random characters, but I do run into this once in awhile in Fedora.
Slight completion hesitation is noticeable in smaller cases as well, when it just needs to complete the package you're typing and not try to show you hundreds of packages as in my examples above.
Happy to provide any additional info, if more detail is helpful. Again, not sure where the difference lies, maybe its the data that bash-completion is fed, and not bash-completion itself.
It's not about bash-completion, it's about yum vs apt-get.
To get a rough picture of it, check out "yum -C list available" vs the corresponding apt-get (or is it apt-cache? don't remember offhand) command.
comparing bash-completion speed with another distro don't make much sense.
But I agree that the bash completion with yum install foo<tab><tab> is very slow
and could be optimized.
If you use a helper python script, you would be able to speed it up
Check how I do it in yumex where I have realtime package lookup when you type
parsing the output from "yum -C list available" will be slow because of the number of packages in Fedora and you have to list all packages every time and filter them.
if you let yum do the searching using returnPackages(patterns=['foo*']) it will speed up thing a lot and you can use YumBase.rpmdb.returnPackages on remove commands and YumBase.pkgsack.returnPackages on install/update commands.
Created attachment 577275 [details]
A little test script to show the concept
We're already using a dedicated script for that, see /usr/share/yum-cli/completion-helper.py - "yum -C list available" was just an easily accessible example and I mentioned "rough picture" with it...
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '16'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 16's end of life.
Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 16 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" and open it against that version of Fedora.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
The process we are following is described here:
Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version.
Thank you for reporting this bug and we are sorry it could not be fixed.