]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt.cc
if conf unset, don't read / as conf/pref/sources dir
[apt.git] / cmdline / apt.cc
index 368822d2d7d53009c049c91285be58e159ae0f2d..4b266bcbe94b61e496dd76cb19473256a76cd1bd 100644 (file)
 #include <apti18n.h>
                                                                        /*}}}*/
 
-bool ShowHelp(CommandLine &, aptDispatchWithHelp const * Cmds)         /*{{{*/
+static bool ShowHelp(CommandLine &)                                    /*{{{*/
 {
    std::cout <<
-    _("Usage: apt [options] command\n"
-      "\n"
-      "CLI for apt.\n")
-    << std::endl;
-   ShowHelpListCommands(Cmds);
+      _("Usage: apt [options] command\n"
+           "\n"
+           "apt is a commandline package manager and provides commands for\n"
+           "searching and managing as well as querying information about packages.\n"
+           "It provides the same functionality as the specialized APT tools,\n"
+           "like apt-get and apt-cache, but enables options more suitable for\n"
+           "interactive use by default.\n");
    return true;
 }
                                                                        /*}}}*/
-std::vector<aptDispatchWithHelp> GetCommands()                         /*{{{*/
+static std::vector<aptDispatchWithHelp> GetCommands()                  /*{{{*/
 {
    return {
       // query
@@ -95,10 +97,8 @@ std::vector<aptDispatchWithHelp> GetCommands()                               /*{{{*/
                                                                        /*}}}*/
 int main(int argc, const char *argv[])                                 /*{{{*/
 {
-   InitLocale();
-
    CommandLine CmdL;
-   auto const Cmds = ParseCommandLine(CmdL, APT_CMD::APT, &_config, &_system, argc, argv);
+   auto const Cmds = ParseCommandLine(CmdL, APT_CMD::APT, &_config, &_system, argc, argv, &ShowHelp, &GetCommands);
 
    int const quiet = _config->FindI("quiet", 0);
    if (quiet == 2)