[PATCH] completion-helper: No pkg list when len(prefix) < 1. BZ 1040033

Ville Skyttä ville.skytta at iki.fi
Wed Dec 11 13:13:03 UTC 2013


On Tue, Dec 10, 2013 at 5:24 PM, Zdenek Pavlas <zpavlas at redhat.com> wrote:
> ---
>  etc/yum.bash | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/etc/yum.bash b/etc/yum.bash
> index 40541af..aae8992 100644
> --- a/etc/yum.bash
> +++ b/etc/yum.bash
> @@ -19,6 +19,8 @@ _yum_list()
>  {
>      # Fail fast for things that look like paths or options.
>      [[ $2 == */* || $2 == [.~-]* ]] && return
> +    # Listing all packages takes way too long
> +    [[ ${#2} -lt 1 ]] && return

Sure, for "all" and "available" it does, but I wouldn't disable
zero-length completion for "installed" and "updates", they don't take
that long.


More information about the Yum-devel mailing list