X-Git-Url: https://git.rapsys.eu/.gitweb.cgi/youtubedl/blobdiff_plain/620116f59230cf52cae4eedf98c39f7214897e3c..65cc51b0a1ddf217bc2026332532e0f8019c158a:/devscripts/bash-completion.template diff --git a/devscripts/bash-completion.template b/devscripts/bash-completion.template new file mode 100644 index 0000000..3b99a96 --- /dev/null +++ b/devscripts/bash-completion.template @@ -0,0 +1,14 @@ +__youtube-dl() +{ + local cur prev opts + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + opts="{{flags}}" + + if [[ ${cur} == * ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 + fi +} + +complete -F __youtube-dl youtube-dl