class Thor::Options

def current_is_switch?


Returns true if the current value in peek is a registered switch.
def current_is_switch?
  case peek
    when LONG_RE, SHORT_RE, EQ_RE, SHORT_NUM
      switch?($1)
    when SHORT_SQ_RE
      $1.split('').any? { |f| switch?("-#{f}") }
  end
end