Skip to content

Completion Scripts Should Follow Standard Naming Conventions #2352

@ssanumand

Description

@ssanumand

The generated ZSH completion script in zsh_completions.go uses camelCase for local variables (e.g., lastParam, lastChar, flagPrefix, requestComp, noSpace, keepOrder, hasActiveHelp) rather than the standard snake_case convention used in ZSH scripts.

While functionally correct, this deviates from idiomatic ZSH and creates inconsistency with how function names are already handled (e.g., __%[1]s_debug, _%[1]s). Using snake_case for variables would make the generated scripts more consistent with other ZSH completion scripts and more familiar to the ZSH community.

I'm happy to submit a PR for this change if it would be welcome. Opening this issue first to confirm whether the current naming was an intentional choice.

PS: I'd also be happy to do the same for other shells.

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