def main(self, shell=None):
        if not shell:
            shell = os.environ.get(b'SHELL')

            if shell:
                shell = os.path.basename(shell)
            else:
                logging.error('No login shell found. Re-run the command with '
                              'a shell as an argument or refer to manual '
                              'installation in documentation')
                sys.exit()

        if shell in self.SHELLS:
            system = platform.system()

            if system in self.SHELLS[shell]:
                if os.path.exists(self.SHELLS[shell][system]['dest']):
                    self.setup(shell)
                else:
                    logging.error('Could not locate %s completion directory. '
                                  'Refer to manual installation in '
                                  'documentation',
                                  shell)
            else:
                logging.error('The %s operating system is currently '
                              'unsupported',
                              system)
        else:
            logging.error('The shell "%s" is currently unsupported',
                          shell)
Run the command.
dataset/ETHPy150Open reviewboard/rbtools/rbtools/commands/setup_completion.py/SetupCompletion.main