Skip to content

Improve getSuggestions #2510

Description

@shawkins

The similarity method uses a TreeMap, which means that 1 value with a given score will be retained which may cause valid high scoring suggestions to be ignored: https://github.com/remkop/picocli/blob/121646e408bfee65f70875a6ddb94e16e83d958c/src/main/java/picocli/CommandLine.java#L18544

Also no similarity matching is used at all with options:
https://github.com/remkop/picocli/blob/121646e408bfee65f70875a6ddb94e16e83d958c/src/main/java/picocli/CommandLine.java#L18823
Shouldn't scoring and a limited number of suggestions be used there as well?

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