docs: def _handle_star(self, i, current):
          """Handle star."""
  
          if self.pathname:
              if self.after_start and not self.dot:
                  star = self.path_star_dot2
                  globstar = self.path_gstar_dot2
              elif self.after_start:
                  star = self.path_star_dot1
                  globstar = self.path_gstar_dot1
              else:
                  star = self.path_star
                  globstar = self.path_gstar_dot1
              if self.globstar_capture:
                  globstar = '({})'.format(globstar)
          else:
              if self.after_start and not self.dot:
                  star = _NO_DOT + _STAR
              else:
                  star = _STAR
              globstar = ''
          value = star
  
          if self.after_start and self.globstar and not self.in_list:
              skip = False
              try:
                  c = next(i)
                  if c != '*':
                      i.rewind(1)
                      raise StopIteration
              except StopIteration:
                  # Could not acquire a second star, so assume single star pattern
                  skip = True
  
              if not skip:
                  try:
                      index = i.index
                      c = next(i)
                      if c == '\\':
                          try:
                              self._references(i, True)
                              # Was not what we expected
                              # Assume two single stars
                          except PathNameException:
                              # Looks like escape was a valid slash
                              # Store pattern accordingly
                              value = globstar
                          except StopIteration:
                              # Ran out of characters so assume backslash
                              # count as a double star
                              if self.sep == '\\':
                                  value = globstar
                      elif c == '/' and not self.bslash_abort:
                          value = globstar
  
                      if value != globstar:
                          i.rewind(i.index - index)
                  except StopIteration:
                      # Could not acquire directory slash due to no more characters
                      # Use double star
                      value = globstar
  
          if self.after_start and value != globstar:
              value = _NEED_CHAR + value
              # Consume duplicate starts
              try:
                  c = next(i)
                  while c == '*':
                      c = next(i)
                  i.rewind(1)
              except StopIteration:
                  pass
  
          self.reset_dir_track()
          if value == globstar:
              sep = _GLOBSTAR_DIV % self.get_path_sep()
              # Check if the last entry was a `globstar`
              # If so, don't bother adding another.
              if current[-1] != sep:
                  if current[-1] == '':
                      # At the beginning of the pattern
                      current[-1] = value
                  else:
                      # Replace the last path separator
                      current[-1] = _NEED_SEP % self.get_path_sep()
                      current.append(value)
                  self.consume_path_sep(i)
                  current.append(sep)
              self.set_start_dir()
          else:
              current.append(value)