# bash completion for cvsps -*- shell-script -*- proc _cvsps { local cur prev words cword _init_completion -n : || return match $prev { with -h|-z|-f|-d|-l|--diff-opts|--debuglvl return 0 with -s setglobal COMPREPLY = ''( $( compgen -W "$( $1 2>/dev/null | awk '/^PatchSet:?[ \t]/ { print $2 }' )" -- "$cur" ) ) return 0 with -a setglobal COMPREPLY = ''( $( compgen -W "$( $1 2>/dev/null | awk '/^Author:[ \t]/ { print $2 }' )" -- "$cur" ) ) return 0 with -b setglobal COMPREPLY = ''( $( compgen -W "$( $1 2>/dev/null | awk '/^Branch:[ \t]/ { print $2 }' )" -- "$cur" ) ) return 0 with -r setglobal COMPREPLY = ''( $( compgen -W "$( $1 2>/dev/null | awk '/^Tag:[ \t]+[^(]/ { print $2 }' )" -- "$cur" ) ) return 0 with -p _filedir -d return 0 with --test-log _filedir return 0 with -Z setglobal COMPREPLY = ''( $( compgen -W '{1..9}' -- "$cur" ) ) return 0 with --root _xfunc cvs _cvs_roots return 0 } if [[ "$cur" == -* ]] { setglobal COMPREPLY = ''( $( compgen -W '$( _parse_help "$1" -h )' -- "$cur" ) ) } else { _xfunc cvs _cvs_roots } } && complete -F _cvsps cvsps # ex: ts=4 sw=4 et filetype=sh