aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Alexander Færøy <ahf@0x90.dk> 2008-11-20 10:47:26 +0100
committerAvatar Alexander Færøy <ahf@0x90.dk> 2008-11-20 10:47:26 +0100
commit3ad80da39c3601d21bca2cc22f095efd9a3a5401 (patch)
tree52b10cf118d59b969fec48a7014697e48a233459
parentc7f8115b02bceef2046dffa924d00b2b1ad61895 (diff)
downloadpaludis-3ad80da39c3601d21bca2cc22f095efd9a3a5401.tar.gz
paludis-3ad80da39c3601d21bca2cc22f095efd9a3a5401.tar.xz
Add --help option to cave print-owners and cave print-packages.
-rw-r--r--src/clients/cave/cmd_print_owners.cc6
-rw-r--r--src/clients/cave/cmd_print_packages.cc6
2 files changed, 12 insertions, 0 deletions
diff --git a/src/clients/cave/cmd_print_owners.cc b/src/clients/cave/cmd_print_owners.cc
index 27b3813..4cabc61 100644
--- a/src/clients/cave/cmd_print_owners.cc
+++ b/src/clients/cave/cmd_print_owners.cc
@@ -113,6 +113,12 @@ PrintOwnersCommand::run(
PrintOwnersCommandLine cmdline;
cmdline.run(args, "CAVE", "CAVE_PRINT_OWNERS_OPTIONS", "CAVE_PRINT_OWNERS_CMDLINE");
+ if (cmdline.a_help.specified())
+ {
+ cout << cmdline;
+ return EXIT_SUCCESS;
+ }
+
if (std::distance(cmdline.begin_parameters(), cmdline.end_parameters()) != 1)
throw args::DoHelp("print-owners takes exactly one parameter");
diff --git a/src/clients/cave/cmd_print_packages.cc b/src/clients/cave/cmd_print_packages.cc
index ff4b42b..5680789 100644
--- a/src/clients/cave/cmd_print_packages.cc
+++ b/src/clients/cave/cmd_print_packages.cc
@@ -71,6 +71,12 @@ PrintPackagesCommand::run(
PrintPackagesCommandLine cmdline;
cmdline.run(args, "CAVE", "CAVE_PRINT_PACKAGES_OPTIONS", "CAVE_PRINT_PACKAGES_CMDLINE");
+ if (cmdline.a_help.specified())
+ {
+ cout << cmdline;
+ return EXIT_SUCCESS;
+ }
+
if (cmdline.begin_parameters() != cmdline.end_parameters())
throw args::DoHelp("print-packages takes no parameters");