From 083351898017cc881ef5c6f908f2747303dc36be Mon Sep 17 00:00:00 2001 From: Jun-ichi Takimoto Date: Fri, 23 Jan 2015 23:10:33 +0900 Subject: 34335: fix bugs in _yum_all_pkgs --- ChangeLog | 4 ++++ Completion/Redhat/Command/_yum | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9636f5c67..04f46611b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2015-01-23 Jun-ichi Takimoto + + * 34335: _yum: fix bugs in _yum_all_pkgs + 2015-01-22 Peter Stephenson * 34331: Src/builtin.c, Src/utils.c: don't trip over diff --git a/Completion/Redhat/Command/_yum b/Completion/Redhat/Command/_yum index ae63364e6..a6983283c 100644 --- a/Completion/Redhat/Command/_yum +++ b/Completion/Redhat/Command/_yum @@ -85,15 +85,14 @@ _yum() fi } -# Fills the installed pkg cache +# Fills the all pkg cache _yum_all_pkgs() { if ( [[ ${+_all_pkgs} -eq 0 ]] || _cache_invalid ALL ) && ! _retrieve_cache ALL; then - local prog="yum -C list all | sed 's/\s.*//' | grep '\.'" - _all_pkgs=( $(kages $prog 2>/dev/null) ) - _store_cache ALL _all_pkg + _all_pkgs=( $(yum -C list all | sed 's/\s.*//' | grep '\.' 2>/dev/null) ) + _store_cache ALL _all_pkgs fi } @@ -227,8 +226,9 @@ _yum_list_or_info() else local subcmd subcmd="${${listlist[(r)$words[2]:*]%%:*}}" - # Deal with any aliases + # offer packages selected by the subcommand case $subcmd in + all) _yum_all;; installed) _yum_erase;; available) _yum_install;; updates) _yum_update;; -- cgit 1.4.1