/bash_completion_lib/complete -o filenames/yum-arch

http://github.com/brinkman83/bashrc · #! · 27 lines · 19 code · 8 blank · 0 comment · 0 complexity · 3c2c752296977f319b5d70a26ed2c084 MD5 · raw file

  1. # yum-arch(8) completion
  2. comp_include _filedir _get_cword
  3. _yum_arch()
  4. {
  5. local cur
  6. COMPREPLY=()
  7. cur=`_get_cword`
  8. case "$cur" in
  9. -*)
  10. COMPREPLY=( $( compgen -W '-d -v -vv -n -c -z -s -l -q' -- $cur ) )
  11. ;;
  12. *)
  13. _filedir -d
  14. ;;
  15. esac
  16. return 0
  17. } # _yum_arch()
  18. comp_install -F _yum_arch # Make completion persistent for subsequent invocations
  19. _yum_arch # Generate completions for first invocation