#  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/fs
cmd=mount

optcomplete  $cmd F f s w 
optcomplete -m arg_required  $cmd l
optcomplete -m arg_required  $cmd L
optcomplete -m arg_required  $cmd U
optcomplete -O, -V o -W 'async atime auto defaults dev exec noatime noauto nodev noexec nosuid nouser remount ro rw suid user loop'  $cmd o
optcomplete -O, -V t -W "$xpc_fstype_W"  $cmd t
optcomplete -m filename -C $'
test -z "$XPC_a" || return
case "$XPC_o" in *loop*) compgen -f -- "$XPC_PATTERN"; return ;; esac
compgen -f -- "$XPC_PATTERN" \
	| while read file; do test -b "$file" -o -d "$file" && echo $file; done
# '  $cmd NONOPT1
optcomplete -d  $cmd NONOPT2
optcomplete  $cmd NONOPT

for cmd in mount umount
do
    optcomplete  $cmd V h v n r
    optcomplete -V a  $cmd a

    optcomplete -m getoptparse,short  $cmd
 
    complete -F xpcompfunc $cmd
done

cmd=umount

optcomplete -T '-n "$XPC_a"' -O, -V t -C 'cut -d\  -f3 /etc/mtab #'  $cmd t
optcomplete -C '
if test -n "$XPC_a"; then
	return
else
	cut -d\  -f1-2 /etc/mtab | tr " " "\n"
fi
#'  $cmd NONOPT

