Skip to content

fix(complete): an attached --flag=val completes nothing #999

Description

@jdx

Both implementations complete a flag's value in the detached form and neither does in the attached one:

ex --format <cursor>     ->  json  yaml
ex --format=j            ->  (nothing)

Measured against usage-argv's complete() and against usage complete-word on this spec:

name "ex"
bin "ex"
flag "--format <F>" {
    arg "<F>" {
        choices "json" "yaml"
    }
}

Not a divergence — the two agree — so it is a gap rather than a bug in either. Worth fixing because --flag=value is a form people type and shells do ask about it; zsh and fish both send the attached word through as one token.

Left out of corpus/complete/ deliberately (#998): a vector pinning "nothing happens" would have to be deleted by whoever fixes this, and a corpus vector asserting the absence of a feature reads as a decision that it should be absent. Adding one that expects json is the natural first step of the fix.

AI-assisted — Tool: Claude Code; model: anthropic/claude-opus-5; version: unavailable.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions