diff options
author | Filippo Valsorda <filippo.valsorda@gmail.com> | 2012-12-08 00:37:26 +0100 |
---|---|---|
committer | Filippo Valsorda <filippo.valsorda@gmail.com> | 2012-12-08 00:37:26 +0100 |
commit | 4c1d273e88a88f7a7b9e09bb2bbadb161d25b615 (patch) | |
tree | 71fc9e864d9f75dfadd8844ba35ae1178a5fd15a /devscripts/bash-completion.template | |
parent | a9d2f7e8945abfb792b76ba551f568d3580c30a6 (diff) |
it's curious but bash-completion is with - and not _
Diffstat (limited to 'devscripts/bash-completion.template')
-rw-r--r-- | devscripts/bash-completion.template | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/devscripts/bash-completion.template b/devscripts/bash-completion.template new file mode 100644 index 000000000..3b99a9614 --- /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 |