diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/clients/cave/cmd_owner.cc | 8 | ||||
-rw-r--r-- | src/clients/cave/cmd_print_owners.cc | 8 | ||||
-rw-r--r-- | src/clients/cave/owner_common.cc | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/src/clients/cave/cmd_owner.cc b/src/clients/cave/cmd_owner.cc index c6b5239b3..c8f30f46b 100644 --- a/src/clients/cave/cmd_owner.cc +++ b/src/clients/cave/cmd_owner.cc @@ -63,12 +63,12 @@ namespace } args::ArgsGroup g_owner_options; - args::EnumArg a_match; + args::EnumArg a_type; args::SwitchArg a_dereference; OwnerCommandLine() : g_owner_options(main_options_section(), "Owner options", "Alter how the search is performed."), - a_match(&g_owner_options, "match", 'm', "Which match algorithm to use", + a_type(&g_owner_options, "type", 't', "Which type of match algorithm to use", args::EnumArg::EnumArgOptions ("auto", 'a', "If pattern starts with a /, full; if it contains a /, partial; otherwise, basename") ("basename", 'b', "Basename match") @@ -78,7 +78,7 @@ namespace a_dereference(&g_owner_options, "dereference", 'd', "If the pattern is a path that exists and is a symbolic link, " "dereference it recursively, and then search for the real path.", true) { - add_usage_line("[ --match algorithm ] pattern"); + add_usage_line("[ --type algorithm ] pattern"); } }; @@ -106,7 +106,7 @@ OwnerCommand::run( if (std::distance(cmdline.begin_parameters(), cmdline.end_parameters()) != 1) throw args::DoHelp("owner takes exactly one parameter"); - return owner_common(env, cmdline.a_match.argument(), *cmdline.begin_parameters(), + return owner_common(env, cmdline.a_type.argument(), *cmdline.begin_parameters(), cmdline.a_dereference.specified(), &format_id); } diff --git a/src/clients/cave/cmd_print_owners.cc b/src/clients/cave/cmd_print_owners.cc index 6a89ac0b3..c7636c575 100644 --- a/src/clients/cave/cmd_print_owners.cc +++ b/src/clients/cave/cmd_print_owners.cc @@ -52,11 +52,11 @@ namespace } args::ArgsGroup g_owner_options; - args::EnumArg a_match; + args::EnumArg a_type; PrintOwnersCommandLine() : g_owner_options(main_options_section(), "Owner options", "Alter how the search is performed."), - a_match(&g_owner_options, "match", 'm', "Which match algorithm to use", + a_type(&g_owner_options, "type", 't', "Which type of match algorithm to use", args::EnumArg::EnumArgOptions ("auto", "If pattern starts with a /, full; if it contains a /, partial; otherwise, basename") ("basename", "Basename match") @@ -64,7 +64,7 @@ namespace ("partial", "Partial match"), "auto") { - add_usage_line("[ --match algorithm ] pattern"); + add_usage_line("[ --type algorithm ] pattern"); } }; @@ -92,7 +92,7 @@ PrintOwnersCommand::run( if (std::distance(cmdline.begin_parameters(), cmdline.end_parameters()) != 1) throw args::DoHelp("print-owners takes exactly one parameter"); - return owner_common(env, cmdline.a_match.argument(), *cmdline.begin_parameters(), false, &print_package_id); + return owner_common(env, cmdline.a_type.argument(), *cmdline.begin_parameters(), false, &print_package_id); } std::shared_ptr<args::ArgsHandler> diff --git a/src/clients/cave/owner_common.cc b/src/clients/cave/owner_common.cc index 5b7a205d8..7032174ea 100644 --- a/src/clients/cave/owner_common.cc +++ b/src/clients/cave/owner_common.cc @@ -60,7 +60,7 @@ namespace int paludis::cave::owner_common( const std::shared_ptr<Environment> & env, - const std::string & match, + const std::string & type, const std::string & q, const bool dereference, const std::function<void (const std::shared_ptr<const PackageID> &)> & callback) @@ -83,11 +83,11 @@ paludis::cave::owner_common( if (query.length() >= 2 && '/' == query.at(query.length() - 1)) query.erase(query.length() - 1); - if ("full" == match) + if ("full" == type) handler = handle_full; - else if ("basename" == match) + else if ("basename" == type) handler = handle_basename; - else if ("partial" == match) + else if ("partial" == type) handler = handle_partial; else { |