This is the base functionality for bash completion. Next work (in both fedpkg and rhpkg) depends on decision how should completion be activated:
global: (triggered by # PYTHON_ARGCOMPLETE_OK line in binary)
requires sourcing (probably in .bash_profile) of script /etc/bash_completion.d/python-argcomplete.sh. This can be performed with currently available pythonX-argcomplete packages. I do not like it much.
specific: (preactivated by command complete -F _python_argcomplete rhpkg)
requires script register-python-autocomplete. It is not available in some pythonX-argcomplete packages. It's OK in fc29, eng-rhel-6, eng-rhel-7 arches.
It seems to be more reasonable for me, but some pythonX-argcomplete packages have to be prepared before.
This is the base functionality for bash completion. Next work (in both fedpkg and rhpkg) depends on decision how should completion be activated:
global: (triggered by
# PYTHON_ARGCOMPLETE_OKline in binary)requires sourcing (probably in .bash_profile) of script /etc/bash_completion.d/python-argcomplete.sh. This can be performed with currently available pythonX-argcomplete packages. I do not like it much.
specific: (preactivated by command
complete -F _python_argcomplete rhpkg)requires script register-python-autocomplete. It is not available in some pythonX-argcomplete packages. It's OK in fc29, eng-rhel-6, eng-rhel-7 arches.
It seems to be more reasonable for me, but some pythonX-argcomplete packages have to be prepared before.
Anyway, this PR is needed in both approaches.
Signed-off-by: Ondrej Nosek onosek@redhat.com