]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-mark.cc
deal with --version more centrally
[apt.git] / cmdline / apt-mark.cc
index c49476c7c035917bccd48a7d75f52bcfba076916..b06fcc0ccbeef13b0307ea6b93271120f719fb56 100644 (file)
@@ -280,26 +280,15 @@ static bool ShowSelection(CommandLine &CmdL)                              /*{{{*/
    return true;
 }
                                                                        /*}}}*/
    return true;
 }
                                                                        /*}}}*/
-// ShowHelp - Show a help screen                                       /*{{{*/
-bool ShowHelp(CommandLine &, CommandLine::DispatchWithHelp const * Cmds)
+bool ShowHelp(CommandLine &, aptDispatchWithHelp const * Cmds)         /*{{{*/
 {
 {
-   ioprintf(std::cout, "%s %s (%s)\n", PACKAGE, PACKAGE_VERSION, COMMON_ARCH);
-
    std::cout <<
     _("Usage: apt-mark [options] {auto|manual} pkg1 [pkg2 ...]\n"
       "\n"
       "apt-mark is a simple command line interface for marking packages\n"
       "as manually or automatically installed. It can also list marks.\n")
    std::cout <<
     _("Usage: apt-mark [options] {auto|manual} pkg1 [pkg2 ...]\n"
       "\n"
       "apt-mark is a simple command line interface for marking packages\n"
       "as manually or automatically installed. It can also list marks.\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);
    std::cout << std::endl
    << _("Options:\n"
       "  -h  This help text.\n"
    std::cout << std::endl
    << _("Options:\n"
       "  -h  This help text.\n"
@@ -314,7 +303,7 @@ bool ShowHelp(CommandLine &, CommandLine::DispatchWithHelp const * Cmds)
    return true;
 }
                                                                        /*}}}*/
    return true;
 }
                                                                        /*}}}*/
-std::vector<CommandLine::DispatchWithHelp> GetCommands()               /*{{{*/
+std::vector<aptDispatchWithHelp> GetCommands()                         /*{{{*/
 {
    return {
       {"auto",&DoAuto, _("Mark the given packages as automatically installed")},
 {
    return {
       {"auto",&DoAuto, _("Mark the given packages as automatically installed")},