aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'misc/eselect.bashcomp')
-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 \