1123 {
1126 bool required = true, first = true;
1127 for(
auto const &arg :
m_args ) {
1128 if (first)
1129 first = false;
1130 else
1132 if( arg.isOptional() && required ) {
1134 required = false;
1135 }
1136 os <<
"<" << arg.hint() <<
">";
1137 if( arg.cardinality() == 0 )
1139 }
1140 if( !required )
1144 os <<
"\n\nwhere options are:" << std::endl;
1145 }
1146
1149 size_t optWidth = 0;
1150 for( auto const &cols : rows )
1151 optWidth = (std::max)(optWidth, cols.left.size() + 2);
1152
1153 optWidth = (std::min)(optWidth, consoleWidth/2);
1154
1155 for( auto const &cols : rows ) {
1156 auto row =
1157 TextFlow::Column( cols.left ).width( optWidth ).indent( 2 ) +
1158 TextFlow::Spacer(4) +
1159 TextFlow::Column( cols.right ).width( consoleWidth - 7 - optWidth );
1160 os << row << std::endl;
1161 }
1162 }
auto name() const -> std::string
auto getHelpColumns() const -> std::vector< HelpColumns >
#define CLARA_CONFIG_CONSOLE_WIDTH