@@ -108,9 +108,8 @@ formatOpts(
108
108
}
109
109
110
110
std::string
111
- Opt::format (
112
- const std::size_t maxShortSize, std::size_t maxOffset
113
- ) const noexcept {
111
+ Opt::format (const std::size_t maxShortSize, std::size_t maxOffset)
112
+ const noexcept {
114
113
std::string option;
115
114
if (!shortName.empty ()) {
116
115
option += Bold (Cyan (shortName)).toStr ();
@@ -657,9 +656,8 @@ Cli::calcMaxOffset(const std::size_t maxShortSize) const noexcept {
657
656
}
658
657
659
658
std::string
660
- Cli::formatAllSubcmds (
661
- const bool showHidden, std::size_t maxOffset
662
- ) const noexcept {
659
+ Cli::formatAllSubcmds (const bool showHidden, std::size_t maxOffset)
660
+ const noexcept {
663
661
for (const auto & [name, cmd] : subcmds) {
664
662
if (!showHidden && cmd.isHidden ) {
665
663
// Hidden command should not affect maxOffset if `showHidden` is false.
@@ -706,11 +704,9 @@ Cli::formatCmdHelp() const noexcept {
706
704
str += formatHeader (" Commands:" );
707
705
str += formatAllSubcmds (false , maxOffset);
708
706
str += Subcmd{ " ..." }
709
- .setDesc (
710
- fmt::format (
711
- " See all commands with {}" , Bold (Cyan (" --list" )).toStr ()
712
- )
713
- )
707
+ .setDesc (fmt::format (
708
+ " See all commands with {}" , Bold (Cyan (" --list" )).toStr ()
709
+ ))
714
710
.format (maxOffset);
715
711
str += ' \n ' ;
716
712
str += fmt::format (
@@ -765,11 +761,9 @@ getCli() noexcept {
765
761
.addOpt (Opt{ " -vv" }.setShort (" -vv" ))
766
762
.addOpt (Opt{ " --jobs" }.setShort (" -j" ).setPlaceholder (" <NUM>" ))
767
763
.addSubcmd (Subcmd{ " run" }.setShort (" r" ))
768
- .addSubcmd (
769
- Subcmd{ " build" }.addOpt (
770
- Opt{ " --target" }.setShort (" -t" ).setPlaceholder (" <TARGET>" )
771
- )
772
- );
764
+ .addSubcmd (Subcmd{ " build" }.addOpt (
765
+ Opt{ " --target" }.setShort (" -t" ).setPlaceholder (" <TARGET>" )
766
+ ));
773
767
return cli;
774
768
}
775
769
0 commit comments