def do_bash_completion(self, args):
        commands = set()
        options = set()
        for sc_str, sc in self.subcommands.items():
            if sc_str == 'bash_completion' or sc_str == 'bash-completion':
                continue

            commands.add(sc_str)
            for option in list(sc._optionals._option_string_actions):
                options.add(option)

        print(' '.join(commands | options))
Prints all of the commands and options to stdout.
dataset/ETHPy150Open openstack/python-senlinclient/senlinclient/shell.py/SenlinShell.do_bash_completion