tss2_getdescription 744 B

123456789101112131415161718192021222324252627
  1. # bash completion for tss2_getdescription -*- shell-script -*-
  2. _tss2_getdescription()
  3. {
  4. local cur prev words cword split
  5. _init_completion -s || return
  6. case $prev in
  7. -!(-*)h | --help)
  8. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  9. return;;
  10. -!(-*)[o] | --description)
  11. _filedir
  12. if [ x"$cur" = x ]; then COMPREPLY+=( '-' ); fi
  13. return;;
  14. -!(-*)[p] | --path)
  15. return;;
  16. esac
  17. $split && return
  18. COMPREPLY=( $(compgen -W "-h --help -v --version -f --force --path= -p
  19. --description= -o " -- "$cur") )
  20. [[ $COMPREPLY == *= ]] && compopt -o nospace
  21. } &&
  22. complete -F _tss2_getdescription tss2_getdescription
  23. # ex: filetype=sh