[Bash-completion-commits] [SCM] bash-completion branch, master, updated. e5c2eef34b7418b836bf29fef3d9ac868acb2107
Ville Skyttä
ville.skytta at iki.fi
Mon Mar 30 19:26:50 UTC 2009
The following commit has been merged in the master branch:
commit e5c2eef34b7418b836bf29fef3d9ac868acb2107
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Mon Mar 30 22:25:50 2009 +0300
Cosmetic tweaks.
diff --git a/contrib/yum b/contrib/yum
index f34b96c..78dede7 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()
--
bash-completion
More information about the Bash-completion-commits
mailing list