From: gcmalloc Date: Tue, 11 Dec 2012 18:17:02 +0000 (+0100) Subject: changing the template file extension X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=a4680a590f46b1cee44be04d7f285bbe7b6a8d63;p=youtube-dl changing the template file extension --- diff --git a/Makefile b/Makefile index 426acd357..818d93bdb 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,7 @@ README.txt: README.md youtube-dl.1: README.md pandoc -s -f markdown -t man README.md -o youtube-dl.1 -youtube-dl.bash-completion: youtube_dl/*.py devscripts/bash-completion.template +youtube-dl.bash-completion: youtube_dl/*.py devscripts/bash-completion.in python devscripts/bash-completion.py youtube-dl.tar.gz: all diff --git a/devscripts/bash-completion.in b/devscripts/bash-completion.in new file mode 100644 index 000000000..3b99a9614 --- /dev/null +++ b/devscripts/bash-completion.in @@ -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 diff --git a/devscripts/bash-completion.py b/devscripts/bash-completion.py index 880db7886..49287724d 100644 --- a/devscripts/bash-completion.py +++ b/devscripts/bash-completion.py @@ -7,7 +7,7 @@ sys.path.append(dirn(dirn((os.path.abspath(__file__))))) import youtube_dl BASH_COMPLETION_FILE = "youtube-dl.bash-completion" -BASH_COMPLETION_TEMPLATE = "devscripts/bash-completion.template" +BASH_COMPLETION_TEMPLATE = "devscripts/bash-completion.in" def build_completion(opt_parser): opts_flag = [] diff --git a/devscripts/bash-completion.template b/devscripts/bash-completion.template deleted file mode 100644 index 3b99a9614..000000000 --- a/devscripts/bash-completion.template +++ /dev/null @@ -1,14 +0,0 @@ -__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