code: def used_args(self):
          values = []
          for idx, c in enumerate(self.words[1:]):
              if c.startswith('-'):
                  continue
              option_str = self.words[1:][idx - 1]
              option = self.get_option(option_str)
              if option is None or not option.need_value:
                  values.append((c, c == self.document.get_word_before_cursor(WORD=True)))
          logger.debug("Found args values %s" % values)
          for arg in self.cmd.args.values():
              if not values:
                  raise StopIteration
              if arg.is_multiple:
                  values = []
                  yield arg
              elif type(arg.nargs) is int:
                  for _ in range(arg.nargs):
                      value = values.pop(0)
                      if value[1] is False:
                          yield arg
                      if not values:
                          raise StopIteration