From d8a515ea37c19f4d40bcd85c829f9b843353ac19 Mon Sep 17 00:00:00 2001 From: killua Date: Mon, 16 Mar 2026 17:53:31 +0400 Subject: [PATCH] chore: remove v1 examples --- src/main.cpp | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index bdd829c..67727e7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -118,48 +118,6 @@ void run_grep(argument_parser::base_parser const &parser) { } } -int v1Examples() { - - auto parser = argument_parser::parser{}; - - parser.add_argument("e", "echo", "echoes given variable", echo, false); - parser.add_argument("ep", "echo-point", "echoes given point", echo_point, false); - parser.add_argument("f", "file", "File to grep, required only if using grep", false); - parser.add_argument("g", "grep", "Grep pattern, required only if using grep", false); - parser.add_argument("c", "cat", "Prints the content of the file", cat, false); - parser.add_argument( - "h", "help", "Displays this help text.", - argument_parser::helpers::make_non_parametered_action([&parser] { parser.display_help(conventions); }), false); - - parser.add_argument("p", "point", "Test point", false); - - parser.add_argument>("t", "test", "Test vector", false); - parser.add_argument>("ts", "test-strings", "Test vector", false); - parser.on_complete(::run_grep); - try { - parser.handle_arguments(conventions); - } catch (std::exception const &e) { - std::cerr << "Error: " << e.what() << std::endl; - parser.display_help(conventions); - return -1; - } - - auto test = parser.get_optional>("test"); - if (test) { - for (auto const &item : test.value()) { - std::cout << item << std::endl; - } - } - - auto test_strings = parser.get_optional>("test-strings"); - if (test_strings) { - for (auto const &item : test_strings.value()) { - std::cout << item << std::endl; - } - } - return 0; -} - void run_store_point(argument_parser::base_parser const &parser) { auto point = parser.get_optional("store-point"); if (point) {