#  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=dd

optcomplete  $cmd help 
optcomplete  $cmd version
optcomplete -m rlhint -C '
case "$XPC_PATTERN" in
bs=*|ibs=*|cbs=*|obs=*)
    echo -en "\edescription_only="
    echo "block size (multipliers xM:M, c:1, w:2, b:512, kB:1000, K:1024 ...)"
    ;;
count=*|seek=*|skip=*)
    echo -en "\edescription_only="
    echo "block count (multipliers xM:M, c:1, w:2, b:512, kB:1000, K:1024 ...)"
    ;;
if=*|of=*)
    '"$xpc_nodash_opts"'
    echo -e "\efilename"
    compgen -f -- "$XPC_PATTERN"
    ;;
conv=*)
    '"$xpc_nodash_subopts"'
    echo -e "ascii\nebcdic\nibm\nblock\nunblock\nlcase\nnotrunc\nucase\nswab\nnoerror\nsync"
    ;;
*=*)
    ;;
*)
    echo -e "\eappend=="
    echo -e "bs\nibs\ncbs\nobs\ncount\nseek\nskip\nif\nof\nconv"
    ;;
esac #'  $cmd NONOPT

optcomplete -m long  $cmd

complete -F xpcompfunc  $cmd

unset cmd ${!xpc_*}

