class Thor::Options
def formatted_usage
def formatted_usage return "" if @switches.empty? @switches.map do |opt, type| case type when :boolean "[#{opt}]" when :required opt + "=" + opt.gsub(/\-/, "").upcase else sample = @defaults[undasherize(opt)] sample ||= case type when :optional then undasherize(opt).gsub(/\-/, "_").upcase when :numeric then "N" end "[" + opt + "=" + sample.to_s + "]" end end.join(" ") end