From 1ec6399c00c63ad259b1611a7e7803daa5bd7677 Mon Sep 17 00:00:00 2001 From: Shannon Booth Date: Sun, 21 Apr 2024 08:34:56 +1200 Subject: [PATCH] Everywhere: Remove uneeded short option argument where possible --- Ladybird/AppKit/main.mm | 6 +++--- Ladybird/Qt/main.cpp | 12 ++++++------ Ladybird/WebContent/main.cpp | 12 ++++++------ .../Tools/CodeGenerators/JSSpecCompiler/main.cpp | 2 +- Tests/LibJS/test-test262.cpp | 2 +- Tests/LibJS/test262-runner.cpp | 2 +- Userland/Applications/CrashReporter/main.cpp | 2 +- .../Libraries/LibTest/JavaScriptTestRunnerMain.cpp | 2 +- Userland/Libraries/LibTest/TestSuite.cpp | 6 +++--- Userland/Shell/main.cpp | 6 +++--- Userland/Utilities/comm.cpp | 2 +- Userland/Utilities/du.cpp | 4 ++-- Userland/Utilities/grep.cpp | 2 +- Userland/Utilities/headless-browser.cpp | 2 +- Userland/Utilities/icc.cpp | 6 +++--- Userland/Utilities/ls.cpp | 2 +- Userland/Utilities/paste.cpp | 2 +- Userland/Utilities/rm.cpp | 2 +- Userland/Utilities/run-tests.cpp | 2 +- Userland/Utilities/tar.cpp | 4 ++-- Userland/Utilities/wasm.cpp | 2 +- 21 files changed, 41 insertions(+), 41 deletions(-) diff --git a/Ladybird/AppKit/main.mm b/Ladybird/AppKit/main.mm index a25ed505c91..971bc52bf71 100644 --- a/Ladybird/AppKit/main.mm +++ b/Ladybird/AppKit/main.mm @@ -53,10 +53,10 @@ ErrorOr serenity_main(Main::Arguments arguments) args_parser.set_general_help("The Ladybird web browser"); args_parser.add_positional_argument(raw_urls, "URLs to open", "url", Core::ArgsParser::Required::No); args_parser.add_option(webdriver_content_ipc_path, "Path to WebDriver IPC for WebContent", "webdriver-content-path", 0, "path", Core::ArgsParser::OptionHideMode::CommandLineAndMarkdown); - args_parser.add_option(use_gpu_painting, "Enable GPU painting", "enable-gpu-painting", 0); - args_parser.add_option(debug_web_content, "Wait for debugger to attach to WebContent", "debug-web-content", 0); + args_parser.add_option(use_gpu_painting, "Enable GPU painting", "enable-gpu-painting"); + args_parser.add_option(debug_web_content, "Wait for debugger to attach to WebContent", "debug-web-content"); args_parser.add_option(certificates, "Path to a certificate file", "certificate", 'C', "certificate"); - args_parser.add_option(log_all_js_exceptions, "Log all JavaScript exceptions", "log-all-js-exceptions", 0); + args_parser.add_option(log_all_js_exceptions, "Log all JavaScript exceptions", "log-all-js-exceptions"); args_parser.parse(arguments); WebView::ProcessManager::initialize(); diff --git a/Ladybird/Qt/main.cpp b/Ladybird/Qt/main.cpp index 0c0ab3f8c55..4a34eed8db4 100644 --- a/Ladybird/Qt/main.cpp +++ b/Ladybird/Qt/main.cpp @@ -92,13 +92,13 @@ ErrorOr serenity_main(Main::Arguments arguments) args_parser.add_positional_argument(raw_urls, "URLs to open", "url", Core::ArgsParser::Required::No); args_parser.add_option(webdriver_content_ipc_path, "Path to WebDriver IPC for WebContent", "webdriver-content-path", 0, "path", Core::ArgsParser::OptionHideMode::CommandLineAndMarkdown); args_parser.add_option(enable_callgrind_profiling, "Enable Callgrind profiling", "enable-callgrind-profiling", 'P'); - args_parser.add_option(disable_sql_database, "Disable SQL database", "disable-sql-database", 0); - args_parser.add_option(enable_qt_networking, "Enable Qt as the backend networking service", "enable-qt-networking", 0); - args_parser.add_option(use_gpu_painting, "Enable GPU painting", "enable-gpu-painting", 0); - args_parser.add_option(debug_web_content, "Wait for debugger to attach to WebContent", "debug-web-content", 0); + args_parser.add_option(disable_sql_database, "Disable SQL database", "disable-sql-database"); + args_parser.add_option(enable_qt_networking, "Enable Qt as the backend networking service", "enable-qt-networking"); + args_parser.add_option(use_gpu_painting, "Enable GPU painting", "enable-gpu-painting"); + args_parser.add_option(debug_web_content, "Wait for debugger to attach to WebContent", "debug-web-content"); args_parser.add_option(certificates, "Path to a certificate file", "certificate", 'C', "certificate"); - args_parser.add_option(log_all_js_exceptions, "Log all JavaScript exceptions", "log-all-js-exceptions", 0); - args_parser.add_option(enable_idl_tracing, "Enable IDL tracing", "enable-idl-tracing", 0); + args_parser.add_option(log_all_js_exceptions, "Log all JavaScript exceptions", "log-all-js-exceptions"); + args_parser.add_option(enable_idl_tracing, "Enable IDL tracing", "enable-idl-tracing"); args_parser.parse(arguments); WebView::ProcessManager::initialize(); diff --git a/Ladybird/WebContent/main.cpp b/Ladybird/WebContent/main.cpp index 6d6367bb232..c3c417faf9b 100644 --- a/Ladybird/WebContent/main.cpp +++ b/Ladybird/WebContent/main.cpp @@ -104,13 +104,13 @@ ErrorOr serenity_main(Main::Arguments arguments) args_parser.add_option(command_line, "Chrome process command line", "command-line", 0, "command_line"); args_parser.add_option(executable_path, "Chrome process executable path", "executable-path", 0, "executable_path"); args_parser.add_option(request_server_socket, "File descriptor of the socket for the RequestServer connection", "request-server-socket", 'r', "request_server_socket"); - args_parser.add_option(is_layout_test_mode, "Is layout test mode", "layout-test-mode", 0); - args_parser.add_option(use_lagom_networking, "Enable Lagom servers for networking", "use-lagom-networking", 0); - args_parser.add_option(use_gpu_painting, "Enable GPU painting", "use-gpu-painting", 0); - args_parser.add_option(wait_for_debugger, "Wait for debugger", "wait-for-debugger", 0); + args_parser.add_option(is_layout_test_mode, "Is layout test mode", "layout-test-mode"); + args_parser.add_option(use_lagom_networking, "Enable Lagom servers for networking", "use-lagom-networking"); + args_parser.add_option(use_gpu_painting, "Enable GPU painting", "use-gpu-painting"); + args_parser.add_option(wait_for_debugger, "Wait for debugger", "wait-for-debugger"); args_parser.add_option(mach_server_name, "Mach server name", "mach-server-name", 0, "mach_server_name"); - args_parser.add_option(log_all_js_exceptions, "Log all JavaScript exceptions", "log-all-js-exceptions", 0); - args_parser.add_option(enable_idl_tracing, "Enable IDL tracing", "enable-idl-tracing", 0); + args_parser.add_option(log_all_js_exceptions, "Log all JavaScript exceptions", "log-all-js-exceptions"); + args_parser.add_option(enable_idl_tracing, "Enable IDL tracing", "enable-idl-tracing"); args_parser.parse(arguments); diff --git a/Meta/Lagom/Tools/CodeGenerators/JSSpecCompiler/main.cpp b/Meta/Lagom/Tools/CodeGenerators/JSSpecCompiler/main.cpp index 963275875ab..663ddddec81 100644 --- a/Meta/Lagom/Tools/CodeGenerators/JSSpecCompiler/main.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/JSSpecCompiler/main.cpp @@ -117,7 +117,7 @@ ErrorOr serenity_main(Main::Arguments arguments) args_parser.add_option(passes_to_dump_cfg, "Dump CFG after specified passes.", "dump-cfg", 0, "{all|last||-[,...]}"); bool silence_diagnostics = false; - args_parser.add_option(silence_diagnostics, "Silence all diagnostics.", "silence-diagnostics", 0); + args_parser.add_option(silence_diagnostics, "Silence all diagnostics.", "silence-diagnostics"); args_parser.parse(arguments); diff --git a/Tests/LibJS/test-test262.cpp b/Tests/LibJS/test-test262.cpp index 30d6433f80e..788f01d64b3 100644 --- a/Tests/LibJS/test-test262.cpp +++ b/Tests/LibJS/test-test262.cpp @@ -209,7 +209,7 @@ ErrorOr serenity_main(Main::Arguments arguments) args_parser.add_option(runner_command, "Command to run", "runner-command", 'r', "command"); args_parser.add_option(pass_through_parameters, "Parameters to pass through to the runner, will split on spaces", "pass-through", 'p', "parameters"); args_parser.add_option(dont_print_progress, "Hide progress information", "quiet", 'q'); - args_parser.add_option(dont_disable_core_dump, "Enabled core dumps for runner (i.e. don't pass --disable-core-dump)", "enable-core-dumps", 0); + args_parser.add_option(dont_disable_core_dump, "Enabled core dumps for runner (i.e. don't pass --disable-core-dump)", "enable-core-dumps"); args_parser.parse(arguments); // Normalize the path to ensure filenames are consistent diff --git a/Tests/LibJS/test262-runner.cpp b/Tests/LibJS/test262-runner.cpp index 0a34d66c7c0..e49e4f12e8e 100644 --- a/Tests/LibJS/test262-runner.cpp +++ b/Tests/LibJS/test262-runner.cpp @@ -583,7 +583,7 @@ int main(int argc, char** argv) args_parser.add_option(s_parse_only, "Only parse the files", "parse-only", 'p'); args_parser.add_option(timeout, "Seconds before test should timeout", "timeout", 't', "seconds"); args_parser.add_option(enable_debug_printing, "Enable debug printing", "debug", 'd'); - args_parser.add_option(disable_core_dumping, "Disable core dumping", "disable-core-dump", 0); + args_parser.add_option(disable_core_dumping, "Disable core dumping", "disable-core-dump"); args_parser.parse(arguments); #ifdef AK_OS_GNU_HURD diff --git a/Userland/Applications/CrashReporter/main.cpp b/Userland/Applications/CrashReporter/main.cpp index d007e710265..7b063af3f02 100644 --- a/Userland/Applications/CrashReporter/main.cpp +++ b/Userland/Applications/CrashReporter/main.cpp @@ -175,7 +175,7 @@ ErrorOr serenity_main(Main::Arguments arguments) Core::ArgsParser args_parser; args_parser.set_general_help("Show information from an application crash coredump."); args_parser.add_positional_argument(coredump_path, "Coredump path", "coredump-path"); - args_parser.add_option(unlink_on_exit, "Delete the coredump after its parsed", "unlink", 0); + args_parser.add_option(unlink_on_exit, "Delete the coredump after its parsed", "unlink"); args_parser.parse(arguments); auto coredump = Coredump::Reader::create(coredump_path); diff --git a/Userland/Libraries/LibTest/JavaScriptTestRunnerMain.cpp b/Userland/Libraries/LibTest/JavaScriptTestRunnerMain.cpp index cdfd6394156..aa4fefbff94 100644 --- a/Userland/Libraries/LibTest/JavaScriptTestRunnerMain.cpp +++ b/Userland/Libraries/LibTest/JavaScriptTestRunnerMain.cpp @@ -115,7 +115,7 @@ int main(int argc, char** argv) }); args_parser.add_option(print_json, "Show results as JSON", "json", 'j'); - args_parser.add_option(per_file, "Show detailed per-file results as JSON (implies -j)", "per-file", 0); + args_parser.add_option(per_file, "Show detailed per-file results as JSON (implies -j)", "per-file"); args_parser.add_option(g_collect_on_every_allocation, "Collect garbage after every allocation", "collect-often", 'g'); args_parser.add_option(JS::Bytecode::g_dump_bytecode, "Dump the bytecode", "dump-bytecode", 'd'); args_parser.add_option(test_glob, "Only run tests matching the given glob", "filter", 'f', "glob"); diff --git a/Userland/Libraries/LibTest/TestSuite.cpp b/Userland/Libraries/LibTest/TestSuite.cpp index 6c99d12cca3..6a41746ce3d 100644 --- a/Userland/Libraries/LibTest/TestSuite.cpp +++ b/Userland/Libraries/LibTest/TestSuite.cpp @@ -128,11 +128,11 @@ int TestSuite::main(ByteString const& suite_name, Span arguments) bool do_list_cases = false; StringView search_string = "*"sv; - args_parser.add_option(do_tests_only, "Only run tests.", "tests", 0); - args_parser.add_option(do_benchmarks_only, "Only run benchmarks.", "bench", 0); + args_parser.add_option(do_tests_only, "Only run tests.", "tests"); + args_parser.add_option(do_benchmarks_only, "Only run benchmarks.", "bench"); args_parser.add_option(m_benchmark_repetitions, "Number of times to repeat each benchmark (default 1)", "benchmark_repetitions", 0, "N"); args_parser.add_option(m_randomized_runs, "Number of times to run each RANDOMIZED_TEST_CASE (default 100)", "randomized_runs", 0, "RUNS"); - args_parser.add_option(do_list_cases, "List available test cases.", "list", 0); + args_parser.add_option(do_list_cases, "List available test cases.", "list"); args_parser.add_positional_argument(search_string, "Only run matching cases.", "pattern", Core::ArgsParser::Required::No); args_parser.parse(arguments); diff --git a/Userland/Shell/main.cpp b/Userland/Shell/main.cpp index dacddf60069..30c3d2708e4 100644 --- a/Userland/Shell/main.cpp +++ b/Userland/Shell/main.cpp @@ -174,11 +174,11 @@ ErrorOr serenity_main(Main::Arguments arguments) Core::ArgsParser parser; parser.add_option(command_to_run, "String to read commands from", "command-string", 'c', "command-string"); - parser.add_option(skip_rc_files, "Skip running shellrc files", "skip-shellrc", 0); + parser.add_option(skip_rc_files, "Skip running shellrc files", "skip-shellrc"); parser.add_option(format, "Format the given file into stdout and exit", "format", 0, "file"); parser.add_option(should_format_live, "Enable live formatting", "live-formatting", 'f'); - parser.add_option(keep_open, "Keep the shell open after running the specified command or file", "keep-open", 0); - parser.add_option(posix_mode, "Behave like a POSIX-compatible shell", "posix", 0); + parser.add_option(keep_open, "Keep the shell open after running the specified command or file", "keep-open"); + parser.add_option(posix_mode, "Behave like a POSIX-compatible shell", "posix"); parser.add_positional_argument(file_to_read_from, "File to read commands from", "file", Core::ArgsParser::Required::No); parser.add_positional_argument(script_args, "Extra arguments to pass to the script (via $* and co)", "argument", Core::ArgsParser::Required::No); diff --git a/Userland/Utilities/comm.cpp b/Userland/Utilities/comm.cpp index 97e897c7c2e..a37bfe0b382 100644 --- a/Userland/Utilities/comm.cpp +++ b/Userland/Utilities/comm.cpp @@ -39,7 +39,7 @@ ErrorOr serenity_main(Main::Arguments arguments) args_parser.add_option(suppress_col3, "Suppress column 3 (lines common to both files)", nullptr, '3'); args_parser.add_option(case_insensitive, "Use case-insensitive comparison of lines", nullptr, 'i'); args_parser.add_option(color, "Always print colored output", "color", 'c'); - args_parser.add_option(no_color, "Do not print colored output", "no-color", 0); + args_parser.add_option(no_color, "Do not print colored output", "no-color"); args_parser.add_option(print_total, "Print a summary", "total", 't'); args_parser.add_positional_argument(file1_path, "First file to compare", "file1"); args_parser.add_positional_argument(file2_path, "Second file to compare", "file2"); diff --git a/Userland/Utilities/du.cpp b/Userland/Utilities/du.cpp index 9cd5c2faa8b..d85cff017b1 100644 --- a/Userland/Utilities/du.cpp +++ b/Userland/Utilities/du.cpp @@ -116,9 +116,9 @@ ErrorOr parse_args(Main::Arguments arguments, Vector& files, D Core::ArgsParser args_parser; args_parser.set_general_help("Display actual or apparent disk usage of files or directories."); args_parser.add_option(du_option.all, "Write counts for all files, not just directories", "all", 'a'); - args_parser.add_option(du_option.apparent_size, "Print apparent sizes, rather than disk usage", "apparent-size", 0); + args_parser.add_option(du_option.apparent_size, "Print apparent sizes, rather than disk usage", "apparent-size"); args_parser.add_option(du_option.human_readable, "Print human-readable sizes", "human-readable", 'h'); - args_parser.add_option(du_option.human_readable_si, "Print human-readable sizes in SI units", "si", 0); + args_parser.add_option(du_option.human_readable_si, "Print human-readable sizes in SI units", "si"); args_parser.add_option(du_option.max_depth, "Print the total for a directory or file only if it is N or fewer levels below the command line argument", "max-depth", 'd', "N"); args_parser.add_option(summarize, "Display only a total for each argument", "summarize", 's'); args_parser.add_option(du_option.threshold, "Exclude entries smaller than size if positive, or entries greater than size if negative", "threshold", 't', "size"); diff --git a/Userland/Utilities/grep.cpp b/Userland/Utilities/grep.cpp index 833dbd2a028..33210382d3a 100644 --- a/Userland/Utilities/grep.cpp +++ b/Userland/Utilities/grep.cpp @@ -204,7 +204,7 @@ ErrorOr serenity_main(Main::Arguments args) return true; }, }); - args_parser.add_option(disable_hyperlinks, "Disable hyperlinks", "no-hyperlinks", 0); + args_parser.add_option(disable_hyperlinks, "Disable hyperlinks", "no-hyperlinks"); args_parser.add_option(count_lines, "Output line count instead of line contents", "count", 'c'); args_parser.add_positional_argument(files, "File(s) to process", "file", Core::ArgsParser::Required::No); args_parser.parse(args); diff --git a/Userland/Utilities/headless-browser.cpp b/Userland/Utilities/headless-browser.cpp index 5fb3623d1df..63a97b8e26a 100644 --- a/Userland/Utilities/headless-browser.cpp +++ b/Userland/Utilities/headless-browser.cpp @@ -685,7 +685,7 @@ ErrorOr serenity_main(Main::Arguments arguments) args_parser.add_option(dump_gc_graph, "Dump GC graph", "dump-gc-graph", 'G'); args_parser.add_option(resources_folder, "Path of the base resources folder (defaults to /res)", "resources", 'r', "resources-root-path"); args_parser.add_option(web_driver_ipc_path, "Path to the WebDriver IPC socket", "webdriver-ipc-path", 0, "path"); - args_parser.add_option(is_layout_test_mode, "Enable layout test mode", "layout-test-mode", 0); + args_parser.add_option(is_layout_test_mode, "Enable layout test mode", "layout-test-mode"); args_parser.add_option(certificates, "Path to a certificate file", "certificate", 'C', "certificate"); args_parser.add_positional_argument(raw_url, "URL to open", "url", Core::ArgsParser::Required::No); args_parser.parse(arguments); diff --git a/Userland/Utilities/icc.cpp b/Userland/Utilities/icc.cpp index 566fcdd01a7..fea7c162918 100644 --- a/Userland/Utilities/icc.cpp +++ b/Userland/Utilities/icc.cpp @@ -244,13 +244,13 @@ ErrorOr serenity_main(Main::Arguments arguments) args_parser.add_option(reencode_out_path, "Reencode ICC profile to this path", "reencode-to", 0, "FILE"); bool debug_roundtrip = false; - args_parser.add_option(debug_roundtrip, "Check how many u8 colors roundtrip losslessly through the profile. For debugging.", "debug-roundtrip", 0); + args_parser.add_option(debug_roundtrip, "Check how many u8 colors roundtrip losslessly through the profile. For debugging.", "debug-roundtrip"); bool measure = false; - args_parser.add_option(measure, "For RGB ICC profiles, print perceptually smallest and largest color step", "measure", 0); + args_parser.add_option(measure, "For RGB ICC profiles, print perceptually smallest and largest color step", "measure"); bool force_print = false; - args_parser.add_option(force_print, "Print profile even when writing ICC files", "print", 0); + args_parser.add_option(force_print, "Print profile even when writing ICC files", "print"); args_parser.parse(arguments); diff --git a/Userland/Utilities/ls.cpp b/Userland/Utilities/ls.cpp index 42df331431d..7e26880c759 100644 --- a/Userland/Utilities/ls.cpp +++ b/Userland/Utilities/ls.cpp @@ -138,7 +138,7 @@ ErrorOr serenity_main(Main::Arguments arguments) args_parser.add_option(flag_hide_group, "In long format, do not show group information. Implies '-l'", nullptr, 'o'); args_parser.add_option(flag_hide_owner, "In long format, do not show owner information. Implies '-l'", nullptr, 'g'); args_parser.add_option(flag_human_readable, "Print human-readable sizes", "human-readable", 'h'); - args_parser.add_option(flag_human_readable_si, "Print human-readable sizes in SI units", "si", 0); + args_parser.add_option(flag_human_readable_si, "Print human-readable sizes in SI units", "si"); args_parser.add_option(flag_disable_hyperlinks, "Disable hyperlinks", "no-hyperlinks", 'K'); args_parser.add_option(flag_recursive, "List subdirectories recursively", "recursive", 'R'); args_parser.add_option(flag_force_newline, "List one file per line", nullptr, '1'); diff --git a/Userland/Utilities/paste.cpp b/Userland/Utilities/paste.cpp index ba87b96e914..1ab843a50e9 100644 --- a/Userland/Utilities/paste.cpp +++ b/Userland/Utilities/paste.cpp @@ -57,7 +57,7 @@ ErrorOr serenity_main(Main::Arguments arguments) Core::ArgsParser args_parser; args_parser.set_general_help("Paste from the clipboard to stdout."); - args_parser.add_option(print_type, "Display the copied type", "print-type", 0); + args_parser.add_option(print_type, "Display the copied type", "print-type"); args_parser.add_option(no_newline, "Do not append a newline", "no-newline", 'n'); args_parser.add_option(watch, "Run a command when clipboard data changes", "watch", 'w'); args_parser.add_positional_argument(watch_command, "Command to run in watch mode", "command", Core::ArgsParser::Required::No); diff --git a/Userland/Utilities/rm.cpp b/Userland/Utilities/rm.cpp index 107b9374c57..1b04534cdcd 100644 --- a/Userland/Utilities/rm.cpp +++ b/Userland/Utilities/rm.cpp @@ -27,7 +27,7 @@ ErrorOr serenity_main(Main::Arguments arguments) args_parser.add_option(recursive, "Delete directories recursively", "recursive", 'r'); args_parser.add_option(force, "Ignore nonexistent files", "force", 'f'); args_parser.add_option(verbose, "Verbose", "verbose", 'v'); - args_parser.add_option(no_preserve_root, "Do not consider '/' specially", "no-preserve-root", 0); + args_parser.add_option(no_preserve_root, "Do not consider '/' specially", "no-preserve-root"); args_parser.add_positional_argument(paths, "Path(s) to remove", "path", Core::ArgsParser::Required::No); args_parser.parse(arguments); diff --git a/Userland/Utilities/run-tests.cpp b/Userland/Utilities/run-tests.cpp index 6c112deccf1..4f7fd5aad82 100644 --- a/Userland/Utilities/run-tests.cpp +++ b/Userland/Utilities/run-tests.cpp @@ -352,7 +352,7 @@ ErrorOr serenity_main(Main::Arguments arguments) args_parser.add_option(print_all_output, "Show all test output", "verbose", 'v'); args_parser.add_option(run_benchmarks, "Run benchmarks as well", "benchmarks", 'b'); args_parser.add_option(run_skipped_tests, "Run all matching tests, even those marked as 'skip'", "all", 'a'); - args_parser.add_option(unlink_coredumps, "Unlink coredumps after printing backtraces", "unlink-coredumps", 0); + args_parser.add_option(unlink_coredumps, "Unlink coredumps after printing backtraces", "unlink-coredumps"); args_parser.add_option(test_glob, "Only run tests matching the given glob", "filter", 'f', "glob"); args_parser.add_option(exclude_pattern, "Regular expression to use to exclude paths from being considered tests", "exclude-pattern", 'e', "pattern"); args_parser.add_option(config_file, "Configuration file to use", "config-file", 'c', "filename"); diff --git a/Userland/Utilities/tar.cpp b/Userland/Utilities/tar.cpp index 89b7d04d10a..01cd5876beb 100644 --- a/Userland/Utilities/tar.cpp +++ b/Userland/Utilities/tar.cpp @@ -48,9 +48,9 @@ ErrorOr serenity_main(Main::Arguments arguments) args_parser.add_option(list, "List contents", "list", 't'); args_parser.add_option(verbose, "Print paths", "verbose", 'v'); args_parser.add_option(gzip, "Compress or decompress file using gzip", "gzip", 'z'); - args_parser.add_option(lzma, "Compress or decompress file using lzma", "lzma", 0); + args_parser.add_option(lzma, "Compress or decompress file using lzma", "lzma"); args_parser.add_option(xz, "Compress or decompress file using xz", "xz", 'J'); - args_parser.add_option(no_auto_compress, "Do not use the archive suffix to select the compression algorithm", "no-auto-compress", 0); + args_parser.add_option(no_auto_compress, "Do not use the archive suffix to select the compression algorithm", "no-auto-compress"); args_parser.add_option(directory, "Directory to extract to/create from", "directory", 'C', "DIRECTORY"); args_parser.add_option(archive_file, "Archive file", "file", 'f', "FILE"); args_parser.add_option(dereference, "Follow symlinks", "dereference", 'h'); diff --git a/Userland/Utilities/wasm.cpp b/Userland/Utilities/wasm.cpp index ae0a841ceb4..9417b721cc1 100644 --- a/Userland/Utilities/wasm.cpp +++ b/Userland/Utilities/wasm.cpp @@ -503,7 +503,7 @@ ErrorOr serenity_main(Main::Arguments arguments) parser.add_option(print, "Print the parsed module", "print", 'p'); parser.add_option(attempt_instantiate, "Attempt to instantiate the module", "instantiate", 'i'); parser.add_option(exported_function_to_execute, "Attempt to execute the named exported function from the module (implies -i)", "execute", 'e', "name"); - parser.add_option(export_all_imports, "Export noop functions corresponding to imports", "export-noop", 0); + parser.add_option(export_all_imports, "Export noop functions corresponding to imports", "export-noop"); parser.add_option(shell_mode, "Launch a REPL in the module's context (implies -i)", "shell", 's'); parser.add_option(wasi, "Enable WASI", "wasi", 'w'); parser.add_option(Core::ArgsParser::Option {