projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[thisoldhouse] Update test
[youtube-dl]
/
devscripts
/
bash-completion.py
diff --git
a/devscripts/bash-completion.py
b/devscripts/bash-completion.py
index 70a3f552cfbf96df6dbcb54dfe2af4da14143405..3d1391334bd38a23c7024192c6c36522acaa5613 100755
(executable)
--- a/
devscripts/bash-completion.py
+++ b/
devscripts/bash-completion.py
@@
-1,9
+1,11
@@
#!/usr/bin/env python
#!/usr/bin/env python
+from __future__ import unicode_literals
+
import os
from os.path import dirname as dirn
import sys
import os
from os.path import dirname as dirn
import sys
-sys.path.
append(
dirn(dirn((os.path.abspath(__file__)))))
+sys.path.
insert(0,
dirn(dirn((os.path.abspath(__file__)))))
import youtube_dl
BASH_COMPLETION_FILE = "youtube-dl.bash-completion"
import youtube_dl
BASH_COMPLETION_FILE = "youtube-dl.bash-completion"
@@
-23,5
+25,6
@@
def build_completion(opt_parser):
filled_template = template.replace("{{flags}}", " ".join(opts_flag))
f.write(filled_template)
filled_template = template.replace("{{flags}}", " ".join(opts_flag))
f.write(filled_template)
+
parser = youtube_dl.parseOpts()[0]
build_completion(parser)
parser = youtube_dl.parseOpts()[0]
build_completion(parser)