Skip to content

Fuzzy completion: SET PARAM not reachable from SET completion due to namespace conflict #532

@apstndb

Description

@apstndb

Summary\n\nWhen typing SET and triggering fuzzy completion (Ctrl+T), the system variable completion takes over because the SET <variable> pattern matches first. This means SET PARAM param name completion is not reachable until the user manually types SET PARAM (with trailing space).\n\n## Current Behavior\n\n| Input | Completion triggered | argPrefix |\n|-------|---------------------|-----------|\n| SET | fuzzyCompleteVariable | \"\" |\n| SET P | fuzzyCompleteVariable | \"P\" |\n| SET PARAM | fuzzyCompleteVariable | \"PARAM\" |\n| SET PARAM | fuzzyCompleteParam | \"\" |\n\nThe variable name completion pattern (?i)^\\s*SET\\s+(\\S*)$ matches before the param completion pattern (?i)^\\s*SET\\s+PARAM\\s+([^\\s=]*)$ can be reached.\n\n## Root Cause\n\nSET serves as both a system variable setter (SET <variable> = <value>) and a param subcommand prefix (SET PARAM <name> ...). The detectFuzzyContext function returns the first matching completion, and the variable completion pattern is broader.\n\n## Possible Approaches\n\n1. Add PARAM as a special candidate in the variable completion list\n2. Make SET completion two-stage: first choose PARAM or variable name\n3. Adjust pattern priority or matching logic in detectFuzzyContext\n\n## Workaround\n\nType SET PARAM (with trailing space) before triggering Ctrl+T — param completion works correctly from that point.\n\n## Related\n\n- #524 (SET PARAM / UNSET PARAM completion)\n- #509 (origin tracking issue)"}

["enhancement", "fuzzy-finder"]

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