2
0

bash-completion.in 267 B

1234567891011121314
  1. __youtube-dl()
  2. {
  3. local cur prev opts
  4. COMPREPLY=()
  5. cur="${COMP_WORDS[COMP_CWORD]}"
  6. opts="{{flags}}"
  7. if [[ ${cur} == * ]] ; then
  8. COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
  9. return 0
  10. fi
  11. }
  12. complete -F __youtube-dl youtube-dl