Skip to content

Commit

Permalink
Fix formating
Browse files Browse the repository at this point in the history
  • Loading branch information
rjanalik committed Feb 18, 2025
1 parent 269d208 commit b2e1059
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/util/completion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ namespace completion {
// std::replace(str.begin(), str.end(), '-', '_');
//}

std::string get_prefix(CLI::App *cli) {
std::string get_prefix(CLI::App* cli) {
if (cli == nullptr)
return "";

CLI::App *parent = cli->get_parent();
CLI::App* parent = cli->get_parent();
return get_prefix(parent) + "_" + cli->get_name();
}

void create_completion_rec(CLI::App *cli) {
void create_completion_rec(CLI::App* cli) {
std::string func_name = get_prefix(cli);
auto options = cli->get_options();
auto subcommands = cli->get_subcommands({});
Expand Down Expand Up @@ -82,11 +82,11 @@ void create_completion_rec(CLI::App *cli) {
}
fmt::print("}}\n\n");

for(auto *subcom : subcommands)
for(auto* subcom : subcommands)
create_completion_rec(subcom);
}

void create_completion(CLI::App *cli) {
void create_completion(CLI::App* cli) {
create_completion_rec(cli);

fmt::print(R"(
Expand Down
2 changes: 1 addition & 1 deletion src/util/completion.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace util {
namespace completion {

void create_completion(CLI::App *cli);
void create_completion(CLI::App* cli);

} // namespace completion
} // namespace util

0 comments on commit b2e1059

Please sign in to comment.