Everywhere: Remove uneeded short option argument where possible

This commit is contained in:
Shannon Booth 2024-04-21 08:34:56 +12:00 committed by Andreas Kling
parent 88b343061e
commit 1ec6399c00
Notes: sideshowbarker 2024-07-17 18:46:30 +09:00
21 changed files with 41 additions and 41 deletions

View file

@ -53,10 +53,10 @@ ErrorOr<int> 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();

View file

@ -92,13 +92,13 @@ ErrorOr<int> 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();

View file

@ -104,13 +104,13 @@ ErrorOr<int> 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);

View file

@ -117,7 +117,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
args_parser.add_option(passes_to_dump_cfg, "Dump CFG after specified passes.", "dump-cfg", 0, "{all|last|<pass-name>|-<pass-name>[,...]}");
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);

View file

@ -209,7 +209,7 @@ ErrorOr<int> 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

View file

@ -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

View file

@ -175,7 +175,7 @@ ErrorOr<int> 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);

View file

@ -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");

View file

@ -128,11 +128,11 @@ int TestSuite::main(ByteString const& suite_name, Span<StringView> 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);

View file

@ -174,11 +174,11 @@ ErrorOr<int> 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);

View file

@ -39,7 +39,7 @@ ErrorOr<int> 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");

View file

@ -116,9 +116,9 @@ ErrorOr<void> parse_args(Main::Arguments arguments, Vector<ByteString>& 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");

View file

@ -204,7 +204,7 @@ ErrorOr<int> 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);

View file

@ -685,7 +685,7 @@ ErrorOr<int> 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);

View file

@ -244,13 +244,13 @@ ErrorOr<int> 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);

View file

@ -138,7 +138,7 @@ ErrorOr<int> 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');

View file

@ -57,7 +57,7 @@ ErrorOr<int> 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);

View file

@ -27,7 +27,7 @@ ErrorOr<int> 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);

View file

@ -352,7 +352,7 @@ ErrorOr<int> 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");

View file

@ -48,9 +48,9 @@ ErrorOr<int> 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');

View file

@ -503,7 +503,7 @@ ErrorOr<int> 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 {