aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2009-05-24 18:06:14 +0000
committerUlrich Müller <ulm@gentoo.org>2009-05-24 18:06:14 +0000
commit347477ec9b9a3aeba886f8fb27f791327fcd25b2 (patch)
treed581c672e3e51bd65ef92112d8ba67a122a00af3 /misc
parentAvoid hyphen in function identifier. (diff)
downloadeselect-347477ec9b9a3aeba886f8fb27f791327fcd25b2.tar.gz
eselect-347477ec9b9a3aeba886f8fb27f791327fcd25b2.tar.bz2
eselect-347477ec9b9a3aeba886f8fb27f791327fcd25b2.zip
Also skip subaction options.
svn path=/trunk/; revision=563
Diffstat (limited to 'misc')
-rw-r--r--misc/eselect.bashcomp5
1 files changed, 5 insertions, 0 deletions
diff --git a/misc/eselect.bashcomp b/misc/eselect.bashcomp
index 2904388..444b79a 100644
--- a/misc/eselect.bashcomp
+++ b/misc/eselect.bashcomp
@@ -13,9 +13,14 @@ _eselect() {
sedcmd3='s/^ \[[[:digit:]][[:digit:]]*\] *\([[:graph:]]*\).*$/\1/p'
set - "${COMP_WORDS[@]:1}"
+ # skip global options
while [[ $# -gt 1 && $1 == -* ]]; do
shift
done
+ # skip any subaction options
+ while [[ $# -gt 3 && $3 == -* ]]; do
+ set - "${@:1:2}" "${@:4}"
+ done
case $# in
1) possibles=$(eselect help 2>/dev/null \