From f8e9034ac7e7745c3bad556bd96b6ab6dd896d25 Mon Sep 17 00:00:00 2001 From: modeco80 Date: Tue, 21 Jan 2025 17:49:23 -0500 Subject: [PATCH] eupak: Rename "info" command to "list" It makes slightly more sense, especially given the file listing is always printed. So let's do that. --- src/tools/eupak/CMakeLists.txt | 2 +- .../eupak/{InfoCommand.cpp => ListCommand.cpp} | 16 ++++++++-------- src/tools/eupak/main.cpp | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) rename src/tools/eupak/{InfoCommand.cpp => ListCommand.cpp} (89%) diff --git a/src/tools/eupak/CMakeLists.txt b/src/tools/eupak/CMakeLists.txt index 90bc110..2d97473 100644 --- a/src/tools/eupak/CMakeLists.txt +++ b/src/tools/eupak/CMakeLists.txt @@ -12,7 +12,7 @@ add_executable(eupak # eupak commands CreateCommand.cpp - InfoCommand.cpp + ListCommand.cpp ExtractCommand.cpp ) diff --git a/src/tools/eupak/InfoCommand.cpp b/src/tools/eupak/ListCommand.cpp similarity index 89% rename from src/tools/eupak/InfoCommand.cpp rename to src/tools/eupak/ListCommand.cpp index 6ee19b7..a2180d7 100644 --- a/src/tools/eupak/InfoCommand.cpp +++ b/src/tools/eupak/ListCommand.cpp @@ -20,12 +20,12 @@ namespace eupak { constexpr static auto DATE_FORMAT = "%m/%d/%Y %r"; - struct InfoCommand : tool::IToolCommand { - InfoCommand() - : parser("info", EUPAK_VERSION_STR, argparse::default_arguments::help) { + struct ListCommand : tool::IToolCommand { + ListCommand() + : parser("list", EUPAK_VERSION_STR, argparse::default_arguments::help) { // clang-format off parser - .add_description("Print information about a package file."); + .add_description("Lists package file information and files."); parser .add_argument("input") .help("Input archive") @@ -34,8 +34,8 @@ namespace eupak { // FIXME: Probably just print this always, in a thinner format, but use // the existing thicker format for verbosity. parser - .add_argument("--verbose") - .help("Increase information output verbosity (print a list of files).") + .add_argument("-v", "--verbose") + .help("Increase information output verbosity.") .default_value(false) .implicit_value(true); // clang-format on @@ -46,7 +46,7 @@ namespace eupak { } bool ShouldRun(argparse::ArgumentParser& parentParser) const override { - return parentParser.is_subcommand_used("info"); + return parentParser.is_subcommand_used("list"); } int Parse() override { @@ -130,6 +130,6 @@ namespace eupak { Arguments currentArgs; }; - TOOLLIB_REGISTER_TOOLCOMMAND("eupak_info", InfoCommand); + TOOLLIB_REGISTER_TOOLCOMMAND("eupak_list", ListCommand); } // namespace eupak \ No newline at end of file diff --git a/src/tools/eupak/main.cpp b/src/tools/eupak/main.cpp index 351bbf8..cd5d7a8 100644 --- a/src/tools/eupak/main.cpp +++ b/src/tools/eupak/main.cpp @@ -20,7 +20,7 @@ int main(int argc, char** argv) { auto toolCommands = std::vector { tool::ToolCommandFactory::CreateNamed("eupak_create"), tool::ToolCommandFactory::CreateNamed("eupak_extract"), - tool::ToolCommandFactory::CreateNamed("eupak_info"), + tool::ToolCommandFactory::CreateNamed("eupak_list"), }; // clang-format off