#  Copyright (C) 2003 Ingo K"ohne
#  
#  This program is free software; you can redistribute it and/or
#  modify it under the terms of the GNU General Public License
#  as published by the Free Software Foundation; either version 2
#  of the License, or (at your option) any later version.
#  
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#  
#  You should have received a copy of the GNU General Public License along
#  with this program; if not, write to the Free Software Foundation, Inc.,
#  59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.

. ../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_*}

