X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/9055d5e68bd09f31df00e45bd14cb599ba3735e5..42610b9d5a95ec108b74ffbc6446542cf6b0176a:/cmdline/apt.cc diff --git a/cmdline/apt.cc b/cmdline/apt.cc index 368822d2d..4b266bcbe 100644 --- a/cmdline/apt.cc +++ b/cmdline/apt.cc @@ -40,18 +40,20 @@ #include /*}}}*/ -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 GetCommands() /*{{{*/ +static std::vector GetCommands() /*{{{*/ { return { // query @@ -95,10 +97,8 @@ std::vector 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)