From 66962bee233b617e4a9ce436f9b26875511b35e6 Mon Sep 17 00:00:00 2001 From: Simon Johnsson Date: Fri, 26 Sep 2025 18:18:42 +0200 Subject: History Command and Parsing --- cmdline/apt.cc | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'cmdline/apt.cc') diff --git a/cmdline/apt.cc b/cmdline/apt.cc index a876085ce..545b6d0b4 100644 --- a/cmdline/apt.cc +++ b/cmdline/apt.cc @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -83,7 +84,7 @@ static std::vector GetCommands() /*{{{*/ {"remove", &DoInstall, _("remove packages")}, {"autoremove", &DoInstall, _("automatically remove all unused packages")}, {"auto-remove", &DoInstall, nullptr}, - {"autopurge",&DoInstall, nullptr}, + {"autopurge", &DoInstall, nullptr}, {"purge", &DoInstall, nullptr}, // system wide stuff @@ -91,6 +92,10 @@ static std::vector GetCommands() /*{{{*/ {"upgrade", &DoUpgrade, _("upgrade the system by installing/upgrading packages")}, {"full-upgrade", &DoDistUpgrade, _("upgrade the system by removing/installing/upgrading packages")}, + // history stuff + {"history-list", &DoHistoryList, _("show list of history")}, + {"history-info", &DoHistoryInfo, _("show info on specific transactions")}, + // misc {"edit-sources", &EditSources, _("edit the source information file")}, {"modernize-sources", &ModernizeSources, _("modernize .list files to .sources files")}, @@ -101,11 +106,11 @@ static std::vector GetCommands() /*{{{*/ // for compat with muscle memory {"dist-upgrade", &DoDistUpgrade, nullptr}, - {"showsrc",&ShowSrcPackage, nullptr}, - {"depends",&Depends, nullptr}, - {"rdepends",&RDepends, nullptr}, - {"policy",&Policy, nullptr}, - {"build-dep", &DoBuildDep,nullptr}, + {"showsrc", &ShowSrcPackage, nullptr}, + {"depends", &Depends, nullptr}, + {"rdepends", &RDepends, nullptr}, + {"policy", &Policy, nullptr}, + {"build-dep", &DoBuildDep, nullptr}, {"clean", &DoClean, nullptr}, {"distclean", &DoDistClean, nullptr}, {"dist-clean", &DoDistClean, nullptr}, @@ -116,8 +121,7 @@ static std::vector GetCommands() /*{{{*/ {"changelog", &DoChangelog, nullptr}, {"info", &ShowPackage, nullptr}, - {nullptr, nullptr, nullptr} - }; + {nullptr, nullptr, nullptr}}; } /*}}}*/ int main(int argc, const char *argv[]) /*{{{*/ -- cgit v1.2.3-70-g09d2