From a4680a590f46b1cee44be04d7f285bbe7b6a8d63 Mon Sep 17 00:00:00 2001 From: gcmalloc Date: Tue, 11 Dec 2012 19:17:02 +0100 Subject: changing the template file extension --- devscripts/bash-completion.in | 14 ++++++++++++++ devscripts/bash-completion.py | 2 +- devscripts/bash-completion.template | 14 -------------- 3 files changed, 15 insertions(+), 15 deletions(-) create mode 100644 devscripts/bash-completion.in delete mode 100644 devscripts/bash-completion.template (limited to 'devscripts') 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 -- cgit v1.2.3