5f1f321fe4e4954972de8475a7e6f4273bd7b6a9fc93600de73cf391385ac2ee5e7f32ae21f6a144448cf97dd1b07d27d8736e62c7ade899c4ff4907e8a063 994 B

12345678910111213141516171819202122232425262728293031
  1. ###-begin-{pkgname}-completion-###
  2. if type complete &>/dev/null; then
  3. _{pkgname}_completion () {
  4. local words cword
  5. if type _get_comp_words_by_ref &>/dev/null; then
  6. _get_comp_words_by_ref -n = -n @ -n : -w words -i cword
  7. else
  8. cword="$COMP_CWORD"
  9. words=("${COMP_WORDS[@]}")
  10. fi
  11. local si="$IFS"
  12. IFS=$'\n' COMPREPLY=($(COMP_CWORD="$cword" \
  13. COMP_LINE="$COMP_LINE" \
  14. COMP_POINT="$COMP_POINT" \
  15. SHELL=bash \
  16. {completer} completion-server -- "${words[@]}" \
  17. 2>/dev/null)) || return $?
  18. IFS="$si"
  19. if [ "$COMPREPLY" = "__tabtab_complete_files__" ]; then
  20. COMPREPLY=($(compgen -f -- "$cword"))
  21. fi
  22. if type __ltrim_colon_completions &>/dev/null; then
  23. __ltrim_colon_completions "${words[cword]}"
  24. fi
  25. }
  26. complete -o default -F _{pkgname}_completion {pkgname}
  27. fi
  28. ###-end-{pkgname}-completion-###