Skip to content
Snippets Groups Projects

bash-completion: add completion for gstreamer tools

Merged Stéphane Cerveau requested to merge dabrain34/gst-build:dab_fix_bash_completion into master
+ 10
7
@@ -231,6 +231,8 @@ def setup_gdb(options):
return python_paths
def is_bash_completion_available (options):
return os.path.exists(os.path.join(options.builddir, 'subprojects/gstreamer/data/bash-completion/helpers/gst'))
def get_subprocess_env(options, gst_version):
env = os.environ.copy()
@@ -516,13 +518,14 @@ if __name__ == "__main__":
shutil.copyfileobj(src, tmprc)
tmprc.write('\nexport PS1="[gst-%s] $PS1"' % gst_version)
tmprc.flush()
bash_completions_files = []
for p in BASH_COMPLETION_PATHS:
if os.path.exists(p):
bash_completions_files += os.listdir(path=p)
bc_rc = BC_RC.format(bash_completions=' '.join(bash_completions_files), bash_completions_paths=' '.join(BASH_COMPLETION_PATHS))
tmprc.write(bc_rc)
tmprc.flush()
if is_bash_completion_available(options):
bash_completions_files = []
for p in BASH_COMPLETION_PATHS:
if os.path.exists(p):
bash_completions_files += os.listdir(path=p)
bc_rc = BC_RC.format(bash_completions=' '.join(bash_completions_files), bash_completions_paths=' '.join(BASH_COMPLETION_PATHS))
tmprc.write(bc_rc)
tmprc.flush()
args.append("--rcfile")
args.append(tmprc.name)
elif args[0].endswith('fish'):
Loading