From e5c2eef34b7418b836bf29fef3d9ac868acb2107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Mon, 30 Mar 2009 22:25:50 +0300 Subject: [PATCH] Cosmetic tweaks. --- contrib/yum | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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()