/bash_completion.d/cardctl

http://github.com/brinkman83/bashrc · #! · 24 lines · 20 code · 4 blank · 0 comment · 0 complexity · 684dbf672d2b63443a4a3f708b943072 MD5 · raw file

  1. # Linux cardctl(8) completion
  2. have cardctl &&
  3. _cardctl()
  4. {
  5. local cur
  6. COMPREPLY=()
  7. cur=`_get_cword`
  8. if [ $COMP_CWORD -eq 1 ]; then
  9. COMPREPLY=( $( compgen -W 'status config ident suspend \
  10. resume reset eject insert scheme' -- "$cur" ) )
  11. fi
  12. } &&
  13. complete -F _cardctl cardctl
  14. # Local variables:
  15. # mode: shell-script
  16. # sh-basic-offset: 4
  17. # sh-indent-comment: t
  18. # indent-tabs-mode: nil
  19. # End:
  20. # ex: ts=4 sw=4 et filetype=sh