# svnadmin completion -*- shell-script -*- # Use of this file is deprecated. Upstream completion is available in # subversion >= 0.12.0, use that instead. proc _svnadmin { local cur prev words cword _init_completion || return local commands setglobal commands = ''create deltify dump help ? hotcopy list-dblogs list-unused-dblogs load lslocks lstxns recover rmlocks rmtxns setlog verify'' if [[ $cword -eq 1 ]] { if [[ "$cur" == -* ]] { setglobal COMPREPLY = ''( $( compgen -W '--version' -- "$cur" ) ) } else { setglobal COMPREPLY = ''( $( compgen -W "$commands" -- "$cur" ) ) } } else { match $prev { with --config-dir _filedir -d return 0 with --fs-type setglobal COMPREPLY = ''( $( compgen -W 'fsfs bdb' -- "$cur" ) ) return 0 } local command=$(words[1]) if [[ "$cur" == -* ]] { # possible options for the command local options match $command { with create setglobal options = ''--bdb-txn-nosync --bdb-log-keep --config-dir --fs-type'' with deltify setglobal options = ''--revision --quiet'' with dump setglobal options = ''--revision --incremental --quiet --deltas'' with hotcopy setglobal options = ''--clean-logs'' with load setglobal options = ''--ignore-uuid --force-uuid --parent-dir --quiet --use-pre-commit-hook --use-post-commit-hook'' with rmtxns setglobal options = ''--quiet'' with setlog setglobal options = ''--revision --bypass-hooks'' } setglobal options = '" --help'" setglobal COMPREPLY = ''( $( compgen -W "$options" -- "$cur" ) ) } else { if [[ "$command" == @(help|[h?]) ]] { setglobal COMPREPLY = ''( $( compgen -W "$commands" -- "$cur" ) ) } else { _filedir } } } return 0 } && complete -F _svnadmin -o default svnadmin # ex: ts=4 sw=4 et filetype=sh