[youtube] Fix playlist and feed extraction (closes #25675)
[youtube-dl] / devscripts / bash-completion.py
index 70a3f552cfbf96df6dbcb54dfe2af4da14143405..3d1391334bd38a23c7024192c6c36522acaa5613 100755 (executable)
@@ -1,9 +1,11 @@
 #!/usr/bin/env python
+from __future__ import unicode_literals
+
 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"
@@ -23,5 +25,6 @@ def build_completion(opt_parser):
         filled_template = template.replace("{{flags}}", " ".join(opts_flag))
         f.write(filled_template)
 
+
 parser = youtube_dl.parseOpts()[0]
 build_completion(parser)