]> git.bitcoin.ninja Git - youtube-dl/commitdiff
changing the template file extension
authorgcmalloc <gcmalloc@gmail.com>
Tue, 11 Dec 2012 18:17:02 +0000 (19:17 +0100)
committergcmalloc <gcmalloc@gmail.com>
Tue, 11 Dec 2012 18:17:02 +0000 (19:17 +0100)
Makefile
devscripts/bash-completion.in [new file with mode: 0644]
devscripts/bash-completion.py
devscripts/bash-completion.template [deleted file]

index c97d6ffb005d9561dc2fede6f613d026d9c0924e..5073a211ba818971e194dd418c9034a6def3445f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -38,7 +38,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 (file)
index 0000000..3b99a96
--- /dev/null
@@ -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
index 880db7886341ddaec748d4980b19413ff7b9e724..49287724d6b8d1cb6215aaadf150b8a441582993 100644 (file)
@@ -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 (file)
index 3b99a96..0000000
+++ /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