2011-11-01 13:14:45 -07:00
|
|
|
# bash completion for msynctool -*- shell-script -*-
|
2009-05-18 14:03:07 -07:00
|
|
|
|
|
|
|
_msynctool()
|
|
|
|
{
|
2011-04-20 12:42:55 -07:00
|
|
|
local cur prev words cword
|
|
|
|
_init_completion || return
|
2009-05-18 14:03:07 -07:00
|
|
|
|
2011-04-20 12:42:55 -07:00
|
|
|
case $words in
|
2009-10-04 10:42:50 -07:00
|
|
|
--configure)
|
2014-11-16 02:18:41 -08:00
|
|
|
COMPREPLY=( $( compgen -W "$($1 --showgroup \
|
2009-10-04 10:42:50 -07:00
|
|
|
$prev | awk '/^Member/ {print $2}' | sed \
|
|
|
|
-e 's/:$//' )" -- "$cur" ) )
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
--addmember)
|
2014-11-16 02:18:41 -08:00
|
|
|
COMPREPLY=( $( compgen -W '$($1 --listplugins \
|
2009-10-04 10:42:50 -07:00
|
|
|
| sed -e '1d' )' -- "$cur" ) )
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
esac
|
2009-05-18 14:03:07 -07:00
|
|
|
|
2009-10-04 10:42:50 -07:00
|
|
|
case $prev in
|
2009-11-22 02:43:26 -08:00
|
|
|
--configure|--addgroup|--delgroup|--showgroup|--sync|--addmember)
|
2014-11-16 02:18:41 -08:00
|
|
|
COMPREPLY=( $( compgen -W '$($1 --listgroups \
|
2009-10-04 10:42:50 -07:00
|
|
|
| sed -e '1d' )' -- "$cur" ) )
|
|
|
|
return 0
|
|
|
|
;;
|
2009-11-22 02:43:26 -08:00
|
|
|
--showformats|--filter-objtype|--slow-sync)
|
2014-11-16 02:18:41 -08:00
|
|
|
COMPREPLY=( $( compgen -W '$($1 --listobjects \
|
2009-10-04 10:42:50 -07:00
|
|
|
| sed -e '1d' )' -- "$cur" ) )
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
esac
|
2009-05-18 14:03:07 -07:00
|
|
|
|
2013-02-17 13:49:30 -08:00
|
|
|
COMPREPLY=( $( compgen -W '--listgroups --listplugins --listobjects
|
|
|
|
--showformats --showgroup --sync --filter-objtype --slow-sync --wait
|
|
|
|
--multi --addgroup --delgroup --addmember --configure --manual
|
|
|
|
--configdir --conflict' -- "$cur" ) )
|
2009-05-18 14:03:07 -07:00
|
|
|
} &&
|
|
|
|
complete -F _msynctool msynctool
|
2009-10-01 10:54:51 -07:00
|
|
|
|
2009-10-04 10:42:50 -07:00
|
|
|
# ex: ts=4 sw=4 et filetype=sh
|