]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt.cc
deal with --version more centrally
[apt.git] / cmdline / apt.cc
index be2f7663ec8957a4d72b09923ca15efb36852372..3eae221992d1830581a06e1a5ec06b9387f3a3a7 100644 (file)
 
 bool ShowHelp(CommandLine &, aptDispatchWithHelp const * Cmds)         /*{{{*/
 {
-   ioprintf(std::cout, "%s %s (%s)\n", PACKAGE, PACKAGE_VERSION, COMMON_ARCH);
-
-   // FIXME: generate from CommandLine
    std::cout <<
     _("Usage: apt [options] command\n"
       "\n"
       "CLI for apt.\n")
-    << std::endl
-    << _("Commands:") << std::endl;
-   for (; Cmds->Handler != nullptr; ++Cmds)
-   {
-      if (Cmds->Help == nullptr)
-        continue;
-      std::cout << "  " << Cmds->Match << " - " << Cmds->Help << std::endl;
-   }
-
+    << std::endl;
+   ShowHelpListCommands(Cmds);
    return true;
 }
                                                                        /*}}}*/