Optionally trigger argument completion in the invoking shell.

        This method is called to see if bash argument completion is requested
        and to honor the request, if needed. This causes the process to exit
        (early) without giving other ingredients a chance to initialize or shut
        down.

        Due to the way argcomple works, no other ingredient can print()
        anything to stdout prior to this point.

def parse(self, context):
        """
        Optionally trigger argument completion in the invoking shell.

        This method is called to see if bash argument completion is requested
        and to honor the request, if needed. This causes the process to exit
        (early) without giving other ingredients a chance to initialize or shut
        down.

        Due to the way argcomple works, no other ingredient can print()
        anything to stdout prior to this point.
        """
        try:
            import argcomplete
        except ImportError:
            return
        try:
            parser = context.parser
        except AttributeError:
            raise RecipeError(
                """
                The context doesn't have the parser attribute.

                The auto-complete ingredient depends on having a parser object
                to generate completion data for she shell.  In a typical
                application this requires that the AutocompleteIngredient and
                ParserIngredient are present and that the auto-complete
                ingredient precedes the parser.
                """)
        else:
            argcomplete.autocomplete(parser)