jdx/mise · error

title requires exactly 1 argument

Error message

title requires exactly 1 argument

What it means

Arity guard inside the template function registry in crates/aqua-registry/src/template.rs. It fires when a template invokes the `semver` filter with an argument count other than one (zero args or multiple pipe-segment args), before any version parsing happens. Note the message names `semver` — the error string is a shared/templated guard; the same bail text pattern is used across the registry's filters, so a mislabeled filter name in the message can occur when the guard is copied between registrations.

Solutions

  1. Call title with exactly one argument, e.g. `(title .Name)`
  2. Apply title only to a single string value
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/aqua-registry/src/template.rs:351 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/f3a9a18a76b8d702. Report an issue: GitHub.

Appendix: source

Thrown at crates/aqua-registry/src/template.rs:351

        if args.len() != 1 {
            bail!("semver requires exactly 1 argument");
        }
        let input = args[0].as_string();
        let clean_version = input.strip_prefix('v').unwrap_or(&input);
        let version = Versioning::new(clean_version)
            .wrap_err_with(|| format!("invalid semver version: {input}"))?;

        Ok(Box::new(SemVerValue {
            major: version.nth(0).unwrap_or(0),
            minor: version.nth(1).unwrap_or(0),
            patch: version.nth(2).unwrap_or(0),
            original: clean_version.to_string(),
        }) as Box<dyn Value>)
    });

    registry.insert("title", |args| {
        if args.len() != 1 {
            bail!("title requires exactly 1 argument");
        }
        Ok(Box::new(StringValue(args[0].as_string().to_title_case())) as Box<dyn Value>)
    });

    registry.insert("trimV", |args| {
        if args.len() != 1 {
            bail!("trimV requires exactly 1 argument");
        }
        Ok(Box::new(StringValue(
            args[0].as_string().trim_start_matches('v').to_string(),
        )) as Box<dyn Value>)
    });

    registry.insert("trimPrefix", |args| {
        if args.len() != 2 {
            bail!("trimPrefix requires exactly 2 arguments");
        }
        let prefix = args[0].as_string();

View on GitHub (pinned to 533346cc37)