{"id": "patchbench-rust-real-0163", "repo": "pnpm/pnpm", "base_commit": "fecfe8334b47f0acb742a4d78f8cc9e50c64c52b", "status": "no_tests_parsed", "verify_status": null, "error": null, "timing": {"setup": 7.1, "pre_test_0": 235.5, "pre_test_1": 60.9, "post_test_0": 839.0, "post_test_1": 496.8, "total": 1640.3}, "test_cmds": ["cd /tmp/cache/repos/pnpm__pnpm ; CI=1 NO_COLOR=1 TERM=dumb setsid --wait cargo test --locked --workspace --no-fail-fast -- --test-threads=1 &1 | tee test-output.log"], "rebuild_cmds": [], "print_cmds": [], "f2p_pre_ok": true, "pre_detail": {"missing": 0, "wrong": [], "missing_ids": [], "parsed_count": 0}, "p2p_env_dropped_count": 0, "f2p_post_ok": false, "p2p_post_ok": true, "post_detail": {"missing": 0, "wrong": [["hoist::workspace_hoist_walks_every_importer", "fail"], ["custom_resolvers::should_refresh_resolution_forces_re_resolution_past_the_frozen_path", "fail"], ["pnpm_compatibility::same_global_virtual_store_layout_diamond", "fail"], ["pnpm_compatibility::same_global_virtual_store_layout_pure_js", "fail"], ["stale_pin_dedupe::refreshes_stale_transitive_pin_for_caret_range_direct_dep", "fail"], ["custom_resolvers::failing_should_refresh_resolution_aborts_the_install", "fail"], ["custom_resolvers::custom_resolver_receives_current_pkg_on_subsequent_installs", "fail"], ["stale_pin_dedupe::refreshes_stale_transitive_pin_to_higher_direct_dep_version", "fail"], ["hoist::public_hoist_star_hoists_to_root_node_modules", "fail"], ["hoist::private_hoist_pattern_filters_aliases", "fail"]], "missing_ids": [], "parsed_count": 5587}, "raw_tail": ".0.1 (/tmp/cache/repos/pnpm__pnpm/pacquet/crates/cli)\n Compiling itertools v0.13.0\n Compiling convert_case v0.11.0\n Compiling libloading v0.9.0\n Compiling cast v0.3.0\n Compiling ctor v1.0.8\n Compiling junction v2.0.0\n Compiling criterion-plot v0.8.2\n Compiling napi-sys v3.2.2\n Compiling napi-derive-backend v5.1.1\n Compiling ciborium v0.2.2\n Compiling plotters v0.3.7\n Compiling pacquet-napi v0.0.1 (/tmp/cache/repos/pnpm__pnpm/pacquet/crates/napi)\n Compiling tinytemplate v1.2.1\n Compiling page_size v0.6.0\n Compiling oorandom v11.1.5\n Compiling anes v0.1.6\n Compiling rustc-hash v2.1.2\n Compiling criterion v0.8.2\n Compiling napi-derive v3.5.9\n Compiling os_display v0.1.4\n Compiling project-root v0.2.2\n Compiling pacquet-micro-benchmark v0.0.0 (/tmp/cache/repos/pnpm__pnpm/pacquet/tasks/micro-benchmark)\n Compiling pacquet-integrated-benchmark v0.0.0 (/tmp/cache/repos/pnpm__pnpm/pacquet/tasks/integrated-benchmark)\nerror[E0432]: unresolved import `super::is_installed_globally`\n --> pacquet/crates/cli/src/cli_args/self_update/tests.rs:1:27\n |\n1 | use super::{install_pnpm, is_installed_globally, update_version_constraint, version_lt};\n | ^^^^^^^^^^^^^^^^^^^^^ no `is_installed_globally` in `cli_args::self_update`\n\nFor more information about this error, try `rustc --explain E0432`.\nerror: could not compile `pacquet-cli` (lib test) due to 1 previous error\nwarning: build failed, waiting for other jobs to finish...\n\n\n"} {"id": "patchbench-rust-real-0028", "repo": "lalrpop/lalrpop", "base_commit": "21f605036a45223139707ce35dcbd02166d2b0d7", "status": "no_tests_parsed", "verify_status": null, "error": null, "timing": {"setup": 2.5, "pre_test_0": 93.5, "pre_test_1": 75.5, "post_test_0": 93.1, "post_test_1": 0.8, "total": 265.5}, "test_cmds": ["cargo test --workspace 2>&1 | tee test-output.log"], "rebuild_cmds": [], "print_cmds": [], "f2p_pre_ok": true, "pre_detail": {"missing": 0, "wrong": [], "missing_ids": [], "parsed_count": 0}, "p2p_env_dropped_count": 0, "f2p_post_ok": false, "p2p_post_ok": true, "post_detail": {"missing": 16, "wrong": [["verify_lalrpop_generates_itself", "fail"]], "missing_ids": ["tests::test", "fair_ball", "flyball", "nobol7", "popfly - should panic"], "parsed_count": 323}, "raw_tail": " numeric grouping `,` is not supported in rust format strings\n --> /tmp/pb-cargo-target/debug/build/lalrpop-test-259c049af668be29/out/match_section.rs:1324:18\n |\n1324 | format!(\"{__0, __1} {__0, __1}\")\n | - ^ expected `}` in format string\n | |\n | because of this opening brace\n |\n = note: to print `{`, you can escape it using `{{`\n\nerror: invalid format string: python's numeric grouping `,` is not supported in rust format strings\n --> /tmp/pb-cargo-target/debug/build/lalrpop-test-259c049af668be29/out/match_section_byte.rs:1324:18\n |\n1324 | format!(\"{__0, __1} {__0, __1}\")\n | - ^ expected `}` in format string\n | |\n | because of this opening brace\n |\n = note: to print `{`, you can escape it using `{{`\n\nerror: invalid format string: python's numeric grouping `,` is not supported in rust format strings\n --> /tmp/pb-cargo-target/debug/build/lalrpop-test-259c049af668be29/out/match_alternatives.rs:814:18\n |\n814 | format!(\"{__0, __1} {__0, __1}\")\n | - ^ expected `}` in format string\n | |\n | because of this opening brace\n |\n = note: to print `{`, you can escape it using `{{`\n\nerror: could not compile `lalrpop-test` (lib) due to 6 previous errors\nwarning: build failed, waiting for other jobs to finish...\nerror: could not compile `lalrpop-test` (lib test) due to 6 previous errors\n\n\n"} {"id": "patchbench-rust-real-0006", "repo": "gleam-lang/gleam", "base_commit": "157111df6070643addae3f2fd70a888c508f6973", "status": "no_tests_parsed", "verify_status": null, "error": null, "timing": {"setup": 3.4, "pre_test_0": 105.3, "pre_test_1": 19.8, "post_test_0": 108.9, "post_test_1": 20.2, "total": 257.9}, "test_cmds": ["cargo test --workspace -v 2>&1 | tee test-output.log"], "rebuild_cmds": [], "print_cmds": [], "f2p_pre_ok": true, "pre_detail": {"missing": 0, "wrong": [], "missing_ids": [], "parsed_count": 0}, "p2p_env_dropped_count": 4487, "f2p_post_ok": false, "p2p_post_ok": true, "post_detail": {"missing": 60, "wrong": [], "missing_ids": ["generated_tests::erlang_app_generation", "generated_tests::javascript_d_ts", "tests::echo::echo_bitarray", "erlang::tests::inlining::inlining_works_properly_with_record_updates", "generated_tests::with_dep_dev"], "parsed_count": 0}, "raw_tail": "f62ddb681415868.rlib --extern radix_trie=/tmp/pb-cargo-target/debug/deps/libradix_trie-4d0baf70699784c7.rlib --extern rand=/tmp/pb-cargo-target/debug/deps/librand-8f1299d2db8153c8.rlib --extern regex=/tmp/pb-cargo-target/debug/deps/libregex-9fc5ed5a16783ac7.rlib --extern serde=/tmp/pb-cargo-target/debug/deps/libserde-3de1068ace139ab1.rlib --extern serde_json=/tmp/pb-cargo-target/debug/deps/libserde_json-6d91bb54176aafe2.rlib --extern spdx=/tmp/pb-cargo-target/debug/deps/libspdx-f15ca2df0dbfe7b8.rlib --extern stacker=/tmp/pb-cargo-target/debug/deps/libstacker-c04d8338e6eb692a.rlib --extern strum=/tmp/pb-cargo-target/debug/deps/libstrum-7fc2cd47f00dc6a0.rlib --extern tar=/tmp/pb-cargo-target/debug/deps/libtar-559bd4e347a9a6d1.rlib --extern termcolor=/tmp/pb-cargo-target/debug/deps/libtermcolor-c91e7b087907efb2.rlib --extern thiserror=/tmp/pb-cargo-target/debug/deps/libthiserror-93e9590fa5eca502.rlib --extern toml=/tmp/pb-cargo-target/debug/deps/libtoml-8761c1fd0b17f839.rlib --extern tracing=/tmp/pb-cargo-target/debug/deps/libtracing-8d591a5950ce3c4e.rlib --extern unicode_segmentation=/tmp/pb-cargo-target/debug/deps/libunicode_segmentation-ee075e926fc62ff9.rlib --extern vec1=/tmp/pb-cargo-target/debug/deps/libvec1-ac8556c142884259.rlib --extern xxhash_rust=/tmp/pb-cargo-target/debug/deps/libxxhash_rust-83471dc468e35368.rlib -L native=/tmp/pb-cargo-target/debug/build/ring-9c4204c0a5b7ff1b/out -L native=/tmp/pb-cargo-target/debug/build/psm-bca60044526678b7/out` (exit status: 1)\n\n\n"} {"id": "patchbench-rust-real-0070", "repo": "eza-community/eza", "base_commit": "1e82e8630401272fbac3ffe1d4bc71bdc436df74", "status": "verified", "verify_status": "verified", "error": null, "timing": {"setup": 1.1, "pre_test_0": 65.3, "pre_test_1": 1.2, "post_test_0": 55.6, "post_test_1": 1.1, "total": 124.5}, "test_cmds": ["cd /tmp/cache/repos/eza-community__eza && mkdir -p reports && cargo test --workspace -v 2>&1 | tee reports/test-output.log"], "rebuild_cmds": [], "print_cmds": [], "f2p_pre_ok": true, "pre_detail": {"missing": 0, "wrong": [], "missing_ids": [], "parsed_count": 343}, "p2p_env_dropped_count": 0, "f2p_post_ok": true, "p2p_post_ok": true, "post_detail": {"missing": 0, "wrong": [], "missing_ids": [], "parsed_count": 344}, "raw_tail": "ps/librayon-878a2b7cf8e65aca.rlib --extern serde=/tmp/pb-cargo-target/debug/deps/libserde-a17865ecf9dafcda.rlib --extern serde_norway=/tmp/pb-cargo-target/debug/deps/libserde_norway-8021348872ad965a.rlib --extern terminal_size=/tmp/pb-cargo-target/debug/deps/libterminal_size-b3fa26fd57b8cd25.rlib --extern timeago=/tmp/pb-cargo-target/debug/deps/libtimeago-c991441886b9f95c.rlib --extern trycmd=/tmp/pb-cargo-target/debug/deps/libtrycmd-772cba9e1cbdab3f.rlib --extern unicode_width=/tmp/pb-cargo-target/debug/deps/libunicode_width-6090f0301c41ec65.rlib --extern unit_prefix=/tmp/pb-cargo-target/debug/deps/libunit_prefix-bb88989da459d7ed.rlib --extern term_grid=/tmp/pb-cargo-target/debug/deps/libterm_grid-2196aa51ba05e7d2.rlib --extern uzers=/tmp/pb-cargo-target/debug/deps/libuzers-bd9fe2dd9e4d75d6.rlib -C embed-bitcode=no --cfg 'feature=\"default\"' --cfg 'feature=\"git\"' --cfg 'feature=\"git2\"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values(\"default\", \"git\", \"git2\", \"nix\", \"nix-generated\", \"nix-local\", \"powertest\", \"vendored-libgit2\", \"vendored-openssl\"))' --error-format human`\n\nrunning 3 tests\ntest src/fs/recursive_size.rs - fs::recursive_size::RecursiveSize::is_none (line 27) ... ok\ntest src/fs/recursive_size.rs - fs::recursive_size::RecursiveSize::map_or (line 70) ... ok\ntest src/fs/recursive_size.rs - fs::recursive_size::RecursiveSize::unwrap_bytes_or (line 49) ... ok\n\ntest result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s\n\n\n", "context_files": [{"path": "src/options/file_name.rs", "content": "// SPDX-FileCopyrightText: 2024 Christina S\u00f8rensen\n// SPDX-License-Identifier: EUPL-1.2\n//\n// SPDX-FileCopyrightText: 2023-2024 Christina S\u00f8rensen, eza contributors\n// SPDX-FileCopyrightText: 2014 Benjamin Sago\n// SPDX-License-Identifier: MIT\nuse crate::options::parser::ShowWhen;\nuse crate::options::vars::{self, Vars};\nuse crate::options::{NumberSource, OptionsError};\n\nuse crate::output::file_name::{Classify, EmbedHyperlinks, Options, QuoteStyle, ShowIcons};\n\nuse clap::ArgMatches;\n\nimpl Options {\n pub fn deduce(\n matches: &ArgMatches,\n vars: &V,\n is_a_tty: bool,\n ) -> Result {\n let classify = Classify::deduce(matches);\n let show_icons = ShowIcons::deduce(matches, vars)?;\n\n let quote_style = QuoteStyle::deduce(matches);\n let embed_hyperlinks = EmbedHyperlinks::deduce(matches);\n\n let absolute = *matches.get_one(\"absolute\").unwrap();\n\n Ok(Self {\n classify,\n show_icons,\n quote_style,\n embed_hyperlinks,\n absolute,\n is_a_tty,\n })\n }\n}\n\nimpl Classify {\n fn deduce(matches: &ArgMatches) -> Self {\n match matches.get_one(\"classify\") {\n Some(ShowWhen::Auto) => Self::AutomaticAddFileIndicators,\n Some(ShowWhen::Always) => Self::AddFileIndicators,\n None | Some(ShowWhen::Never) => Self::JustFilenames,\n }\n }\n}\n\nimpl ShowIcons {\n pub fn deduce(matches: &ArgMatches, vars: &V) -> Result {\n let force_icons = vars.get(vars::EZA_ICONS_AUTO).is_some();\n let mode_opt = &matches.get_one(\"icons\");\n if !force_icons && mode_opt.is_none() {\n return Ok(Self::Never);\n }\n\n match mode_opt {\n Some(ShowWhen::Never) => Ok(Self::Never),\n Some(ShowWhen::Always) => Ok(Self::Always(Self::get_width(vars)?)),\n Some(ShowWhen::Auto) | None => Ok(Self::Automatic(Self::get_width(vars)?)),\n }\n }\n\n fn get_width(vars: &V) -> Result {\n if let Some(columns) = vars\n .get_with_fallback(vars::EXA_ICON_SPACING, vars::EZA_ICON_SPACING)\n .map(|s| s.to_string_lossy().to_string())\n {\n match columns.parse() {\n Ok(width) => Ok(width),\n Err(e) => {\n let source = NumberSource::Env(\n vars.source(vars::EXA_ICON_SPACING, vars::EZA_ICON_SPACING)\n .unwrap_or(\"1\"),\n );\n Err(OptionsError::FailedParse(columns.clone(), source, e))\n }\n }\n } else {\n Ok(1)\n }\n }\n}\n\nimpl QuoteStyle {\n pub fn deduce(matches: &ArgMatches) -> Self {\n if matches.get_flag(\"no-quotes\") {\n Self::NoQuotes\n } else {\n Self::QuoteSpaces\n }\n }\n}\n\nimpl EmbedHyperlinks {\n fn deduce(matches: &ArgMatches) -> Self {\n match matches.get_one(\"hyperlink\") {\n Some(ShowWhen::Never) | None => Self::Never,\n Some(ShowWhen::Always) => Self::Always,\n Some(ShowWhen::Auto) => Self::Automatic,\n }\n }\n}\n\n#[cfg(test)]\nmod tests {\n use std::ffi::OsString;\n use std::num::ParseIntError;\n\n use super::*;\n use crate::options::parser::ShowWhen;\n use crate::options::parser::test::mock_cli;\n use crate::options::vars::test::MockVars;\n use crate::output::file_name::Absolute;\n\n use clap::ValueEnum;\n\n #[test]\n fn deduce_classify_file_indicators() {\n assert_eq!(\n Classify::deduce(&mock_cli(vec![\"--classify\"])),\n Classify::AutomaticAddFileIndicators\n );\n }\n\n #[test]\n fn deduce_classify_just_filenames() {\n assert_eq!(\n Classify::deduce(&mock_cli(vec![\"\"])),\n Classify::JustFilenames\n );\n }\n\n #[test]\n fn deduce_quote_style_no_quotes() {\n assert_eq!(\n QuoteStyle::deduce(&mock_cli(vec![\"--no-quotes\"])),\n QuoteStyle::NoQuotes\n );\n }\n\n #[test]\n fn deduce_quote_style_quote_spaces() {\n assert_eq!(\n QuoteStyle::deduce(&mock_cli(vec![\"\"])),\n QuoteStyle::QuoteSpaces\n );\n }\n\n #[test]\n fn deduce_embed_hyperlinks_auto() {\n assert_eq!(\n EmbedHyperlinks::deduce(&mock_cli(vec![\"--hyperlink\"])),\n EmbedHyperlinks::Automatic\n );\n assert_eq!(\n EmbedHyperlinks::deduce(&mock_cli(vec![\"--hyperlink\", \"auto\"])),\n EmbedHyperlinks::Automatic\n );\n }\n\n #[test]\n fn deduce_embed_hyperlinks_always() {\n assert_eq!(\n EmbedHyperlinks::deduce(&mock_cli(vec![\"--hyperlink\", \"always\"])),\n EmbedHyperlinks::Always\n );\n }\n\n #[test]\n fn deduce_embed_hyperlinks_never() {\n assert_eq!(\n EmbedHyperlinks::deduce(&mock_cli(vec![\"--hyperlink\", \"never\"])),\n EmbedHyperlinks::Never\n );\n assert_eq!(\n EmbedHyperlinks::deduce(&mock_cli(vec![\"\"])),\n EmbedHyperlinks::Never\n );\n }\n\n #[test]\n fn deduce_show_icons_never_no_arg() {\n assert_eq!(\n ShowIcons::deduce(&mock_cli(vec![\"\"]), &MockVars::default()),\n Ok(ShowIcons::Never)\n );\n }\n\n #[test]\n fn deduce_show_icons_never_no_arg_env() {\n let mut vars = MockVars::default();\n vars.set(vars::EZA_ICONS_AUTO, &OsString::from(\"1\"));\n assert_eq!(\n ShowIcons::deduce(&mock_cli(vec![\"\"]), &vars),\n Ok(ShowIcons::Automatic(1))\n );\n }\n\n #[test]\n fn deduce_show_icon_always() {\n assert_eq!(\n ShowIcons::deduce(&mock_cli(vec![\"--icons\", \"always\"]), &MockVars::default()),\n Ok(ShowIcons::Always(1)),\n );\n }\n\n #[test]\n fn deduce_show_icons_never() {\n assert_eq!(\n ShowIcons::deduce(&mock_cli(vec![\"--icons\", \"never\"]), &MockVars::default()),\n Ok(ShowIcons::Never)\n );\n }\n\n #[test]\n fn deduce_show_icons_auto() {\n assert_eq!(\n ShowIcons::deduce(&mock_cli(vec![\"--icons\", \"auto\"]), &MockVars::default()),\n Ok(ShowIcons::Automatic(1))\n );\n }\n\n #[test]\n fn deduce_show_icons_error() {\n assert_eq!(\n ShowWhen::from_str(\"foo\", false)\n .map_err(|err| OptionsError::BadArgument(\"icons\", err.into())),\n Err(OptionsError::BadArgument(\"icons\", OsString::from(\"foo\")))\n );\n }\n\n #[test]\n fn deduce_show_icons_width() {\n let mut vars = MockVars::default();\n vars.set(vars::EZA_ICON_SPACING, &OsString::from(\"3\"));\n assert_eq!(\n ShowIcons::deduce(&mock_cli(vec![\"--icons\"]), &vars),\n Ok(ShowIcons::Automatic(3))\n );\n }\n\n #[test]\n fn deduce_show_icons_width_error() {\n let mut vars = MockVars::default();\n vars.set(vars::EZA_ICON_SPACING, &OsString::from(\"foo\"));\n\n let e: Result = vars\n .get(vars::EZA_ICON_SPACING)\n .unwrap()\n .to_string_lossy()\n .parse();\n\n assert_eq!(\n ShowIcons::deduce(&mock_cli(vec![\"--icons\", \"auto\"]), &vars),\n Err(OptionsError::FailedParse(\n String::from(\"foo\"),\n NumberSource::Env(vars::EXA_ICON_SPACING),\n e.unwrap_err()\n ))\n );\n }\n\n #[test]\n fn deduce_options() {\n assert_eq!(\n Options::deduce(&mock_cli(vec![\"\"]), &MockVars::default(), true),\n Ok(Options {\n classify: Classify::JustFilenames,\n show_icons: ShowIcons::Never,\n quote_style: QuoteStyle::QuoteSpaces,\n embed_hyperlinks: EmbedHyperlinks::Never,\n absolute: Absolute::Off,\n is_a_tty: true,\n })\n );\n }\n}\n"}, {"path": "src/options/parser.rs", "content": "// SPDX-FileCopyrightText: 2024 Christina S\u00f8rensen\n// SPDX-License-Identifier: EUPL-1.2\n//\n// SPDX-FileCopyrightText: 2023-2024 Christina S\u00f8rensen, eza contributors\n// SPDX-FileCopyrightText: 2014 Benjamin Sago\n// SPDX-License-Identifier: MIT\nuse std::ffi::OsString;\n\nuse clap::{Error, ValueEnum, arg, builder::PossibleValue, value_parser};\n\nuse crate::{\n fs::filter::{SortCase, SortField},\n output::{file_name::Absolute, time::TimeFormat},\n};\n\nconst SORT_FIELDS_HELP: &str = \"[default: name] [possible values:\n name, Name, .name, .Name, ext, ext, created,\n date, age, accessed, changed,\n size, inode, type, none]\";\n\nconst TIME_FIELDS_HELP: &str = \"[possible values:\n mod|modified, acc|accessed, ch|changed, cr|created]\";\n\nconst FORMAT_STYLE_FIELDS_HELP: &str = \"[possible values:\n default, iso, long-iso, full-iso, relative, \\\"+\\\"]\";\n\npub fn get_command() -> clap::Command {\n clap::Command::new(clap::crate_name!())\n .author(clap::crate_authors!())\n .about(clap::crate_description!())\n .version(include_str!(concat!(env!(\"OUT_DIR\"), \"/version_string.txt\")))\n .disable_help_flag(true)\n .disable_version_flag(true)\n .args_override_self(true)\n\n .arg(arg!([FILE]...).value_parser(clap::value_parser!(OsString)).hide_short_help(true))\n\n .next_help_heading(\"META OPTIONS\")\n .arg(arg!(--stdin \"read file names from stdin\"))\n .arg(arg!(-'?' --help \"Print help\").action(clap::ArgAction::HelpShort))\n .arg(arg!(-v --version \"Print help\").action(clap::ArgAction::Version))\n\n .next_help_heading(\"LAYOUT OPTIONS\")\n .arg(arg!(-'1' --oneline \"display one entry per line\"))\n .arg(arg!(-l --long \"display extended file metadata as a table\"))\n .arg(arg!(-G --grid \"display entries as a grid (default)\"))\n .arg(arg!(-x --across \"sort the grid across, rather than downwards\"))\n .arg(arg!(-R --recurse \"recurse into directories\"))\n .arg(arg!(-T --tree \"recurse into directories as a tree\"))\n .arg(arg!(-L --level \"limit the depth of recursion\")\n .value_parser(value_parser!(usize)))\n .arg(arg!(--\"follow-symlinks\" \"drill down into symbolic links that point to directories\"))\n .arg(arg!(-w --width \"set screen width in columns\")\n .value_parser(value_parser!(usize)))\n\n .next_help_heading(\"DISPLAY OPTIONS\")\n .arg(arg!(-F --classify \"display type indicator by file names\")\n .num_args(0..=1)\n .value_parser(value_parser!(ShowWhen))\n .default_missing_value(\"auto\"))\n .arg(arg!(-X --dereference \"dereference symbolic links when displaying information\"))\n .arg(arg!(--absolute \"display entries with their absolute path\")\n .num_args(0..=1)\n .action(clap::ArgAction::Set)\n .value_parser(value_parser!(Absolute))\n .default_missing_value(\"on\")\n .default_value(\"off\")\n .hide_default_value(true))\n .arg(arg!(--color \"When to use colours.\")\n .alias(\"colour\")\n .num_args(0..=1)\n .value_parser(value_parser!(ShowWhen))\n .default_missing_value(\"auto\")\n .default_value(\"auto\"))\n .arg(arg!(--\"color-scale\" \"highlight value of FIELDS distinctly\")\n .num_args(0..)\n .value_parser(value_parser!(ColorScaleArgs))\n .default_missing_value(\"all\")\n .value_delimiter(','))\n .arg(arg!(--\"color-scale-mode\" \"mode for --color-scale\")\n .num_args(1)\n .value_parser(value_parser!(ColorScaleModeArgs))\n .default_value(\"gradient\"))\n .arg(arg!(--icons \"when to display icons\")\n .num_args(0..=1)\n .value_parser(value_parser!(ShowWhen))\n .default_missing_value(\"auto\"))\n .arg(arg!(--hyperlink \"when to display entries as hyperlinks\")\n .num_args(0..=1)\n .value_parser(value_parser!(ShowWhen))\n .default_missing_value(\"auto\"))\n .arg(arg!(--\"no-quotes\" \"don't quote file names with spaces\"))\n\n .next_help_heading(\"FILTERING OPTIONS\")\n .arg(arg!(-a --all... \"show hidden files. Use this twice to also show the '.' and '..' directories\"))\n .arg(arg!(-A --\"almost-all\" \"equivalent to --all; included for compatibility with `ls -A`\"))\n .arg(arg!(-d --\"treat-dirs-as-files\" \"treat directories as files; don't list their contents\")\n .alias(\"list-dirs\") // TODO: compat alias to remove (above flag published in v0.23.4 / 2025-10-03)\n .conflicts_with_all([\"recurse\", \"tree\"]))\n .arg(arg!(-D --\"only-dirs\" \"list only directories\"))\n .arg(arg!(-f --\"only-files\" \"list only files\"))\n .arg(arg!(--\"show-symlinks\" \"explicitly show symbolic links (with --only-dirs and --only-files)\"))\n .arg(arg!(--\"no-symlinks\" \"do not show symbolic links\"))\n .arg(arg!(-I --\"ignore-glob\" \"glob patterns (pipe-separated) of files to ignore\"))\n .arg(arg!(--\"git-ignore\" \"ignore files mentioned in '.gitignore'\"))\n\n .next_help_heading(\"SORTING OPTIONS\")\n .arg(arg!(--\"group-directories-first\" \"list directories before other files\").id(\"dirs-first\"))\n .arg(arg!(--\"group-directories-last\" \"list directories after other files\").id(\"dirs-last\"))\n .arg(arg!(-s --sort )\n .help(format!(\"which field to sort by {SORT_FIELDS_HELP}\"))\n .value_parser(value_parser!(SortField))\n .default_value(\"name\")\n .hide_default_value(true)\n .hide_possible_values(true))\n .arg(arg!(-r --reverse \"reverse the sort order\"))\n\n .next_help_heading(\"LONG VIEW OPTIONS\")\n .arg(arg!(-h --header \"add a header row to each column\"))\n .arg(arg!(-i --inode \"list each file's inode number\"))\n .arg(arg!(-o --\"octal-permissions\" \"list each file's permission in octal format\"))\n .arg(arg!(-H --links \"list each file's number of hard links\"))\n .arg(arg!(-b --binary \"show file sizes with binary prefixes\"))\n .arg(arg!(-B --bytes \"show file sizes in bytes, without any prefixes\"))\n .arg(arg!(--\"total-size\" \"show the size of a directory as the one of its content (unix only)\"))\n .arg(arg!(-S --blocksize \"list size of allocated file system blocks\"))\n .arg(arg!(-g --group \"list each file's group\"))\n .arg(arg!(--\"smart-group\" \"only show group if it has a different name from owner\"))\n .arg(arg!(-n --numeric \"show user and group as their numeric IDs\"))\n .arg(arg!(-t --time ).help(format!(\"which timestamp field to show {TIME_FIELDS_HELP}\"))\n .value_parser(value_parser!(TimeArgs))\n .conflicts_with_all([\"modified\", \"accessed\", \"changed\", \"created\"])\n .hide_possible_values(true))\n .arg(arg!(-m --modified \"show the modified timestamp field (replace default field, combinable)\"))\n .arg(arg!(-u --accessed \"show the accessed timestamp field (replace default field, combinable)\"))\n .arg(arg!(--changed \"show the changed timestamp field (replace default field, combinable)\"))\n .arg(arg!(-U --created \"show the created timestamp field (replace default field, combinable)\"))\n .arg(arg!(--\"time-style\"