
. ../include/common

cmd=grep

optcomplete -W "$xpc_digit_W"  $cmd  A after-context
optcomplete  $cmd a text
optcomplete -W "$xpc_digit_W"  $cmd  B before-context
optcomplete -W "$xpc_digit_W"  $cmd C context
for context in 1 2 3 4 5 6 7 8 9
do
    optcomplete  $cmd $context
done
optcomplete  $cmd byte-offset b
optcomplete -W 'binary without-match text'  $cmd binary-files
optcomplete  $cmd count c
optcomplete -W 'read skip recurse'  $cmd d directories
optcomplete $cmd extended-regexp E
optcomplete -V patt -C :  $cmd regexp e
optcomplete $cmd F fixed-strings
optcomplete -V patt -f  $cmd file f
optcomplete  $cmd basic-regexp G
optcomplete  $cmd H with-filename
optcomplete  $cmd h no-filename
optcomplete  $cmd help
optcomplete  $cmd I
optcomplete  $cmd i ignore-case
optcomplete  $cmd L files-without-match
optcomplete  $cmd l files-with-matches
optcomplete  $cmd mmap
optcomplete  $cmd line-number n
optcomplete  $cmd quiet q silent
optcomplete  $cmd recursive r
optcomplete  $cmd no-messages s
optcomplete  $cmd binary U
optcomplete  $cmd unix-byte-offsets u
optcomplete  $cmd version V
optcomplete  $cmd invert-match v
optcomplete  $cmd word-regexp w
optcomplete  $cmd line-regexp x
optcomplete  $cmd y
optcomplete  $cmd Z null
optcomplete -T '-z "${XPC_patt+x}"' -m arg_required  $cmd NONOPT1
optcomplete -f  $cmd NONOPT

optcomplete -m long,getoptparse,getoptstop  $cmd 

complete -F xpcompfunc $cmd

unset cmd context ${!xpc_*}

