def _bash_completion(self):
commands = set()<EOL>options = set()<EOL>for option, _action in self.parser._option_string_actions.items():<EOL><INDENT>options.add(option)<EOL><DEDENT>for _name, _command in self.command_manager:<EOL><INDENT>commands.add(_name)<EOL>cmd_factory = _command.load()<EOL>cmd = cmd_factory(self, None)<EOL>cmd_parser = cmd.get_parser('<STR_LIT>')<EOL>for option, _action in cmd_parser._option_string_actions.items():<EOL><INDENT>options.add(option)<EOL><DEDENT><DEDENT>print('<STR_LIT:U+0020>'.join(commands | options))<EOL>
Prints all of the commands and options for bash-completion.