/bash_completion_lib/complete/civclient

http://github.com/brinkman83/bashrc · #! · 36 lines · 29 code · 7 blank · 0 comment · 0 complexity · fa5930e86336e091a02b0636bf8a91d7 MD5 · raw file

  1. # civclient completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
  2. comp_include _filedir _get_cword _known_hosts
  3. _civclient()
  4. {
  5. local cur
  6. COMPREPLY=()
  7. cur=`_get_cword`
  8. prev=${COMP_WORDS[COMP_CWORD-1]}
  9. case "$prev" in
  10. -@(l|S|t|-log|-Sound|-tiles))
  11. _filedir
  12. return 0
  13. ;;
  14. -@(P|-Plugin))
  15. COMPREPLY=( $( compgen -W 'none esd sdl' -- $cur ) )
  16. return 0
  17. ;;
  18. -@(s|-server))
  19. _known_hosts
  20. return 0
  21. ;;
  22. esac
  23. if [[ "$cur" == -* ]]; then
  24. COMPREPLY=( $( compgen -W '-a -d -h -l -m -n -p -P -s -S -t -v\
  25. --autoconnect --debug --help --log --meta --name \
  26. --port --Plugin --server --Sound --tiles --version' \
  27. -- $cur ) )
  28. fi
  29. } # _civclient()