diff --git a/contrib/yum b/contrib/yum index f34b96cc..78dede73 100644 --- a/contrib/yum +++ b/contrib/yum @@ -10,8 +10,8 @@ _yum_list() # Try to strip in between headings like "Available Packages" # This will obviously only work for English :P COMPREPLY=( $( yum -d 0 -C list $1 "$cur*" 2>/dev/null | \ - grep -iv '^\(Available\|Installed\|Updated\) Packages' | \ - sed -e 's/[[:space:]].*//' ) ) + sed -ne '/^\(Available\|Installed\|Updated\) /d' \ + -e 's/[[:space:]].*//p' ) ) else # Drop first line (e.g. "Updated Packages") COMPREPLY=( $( yum -d 0 -C list $1 "$cur*" 2>/dev/null | \ @@ -25,7 +25,7 @@ _yum_repolist() # http://yum.baseurl.org/ticket/83 # Drop first ("repo id repo name") axnd last ("repolist: ...") rows yum --noplugins -C repolist $1 2>/dev/null | \ - sed -ne '/^repo\(\s\+id\|list:\)/d' -e 's/\s.*//p' + sed -ne '/^repo\(\s\+id\|list:\)/d' -e 's/[[:space:]].*//p' } _yum()