code: def completedefault(self, text, line, begidx, endidx):
          
          if self.argparser_completer and any((line.startswith(x) for x in self.argparse_names())):
              self.argparser_completer.rl_complete(line, 0)
              return [x[begidx:] for x in self.argparser_completer._rl_matches]
          else:
              return []
docs: Accessing the argcompleter if available.