#404 Initialize bash autocompletion
Merged by onosek. Opened by onosek.
onosek/rpkg initialize_autocompletion  into  master

Download 404.patch

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.

Anyway, this PR is needed in both approaches.

Signed-off-by: Ondrej Nosek onosek@redhat.com

rebased onto 700c1ea16b91a555b4f179a08e512bae10d4f561

@lsedlar except your comment to add conditional import, I run isort on the code.

Looks good to me. :thumbsup:

rebased onto 1e403b51cbd3c49df58f618109a553fdb9d04f5c

Pull-Request has been merged by onosek

Metadata