#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
/*}}}*/
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)