Skip to content

Add a shell-completion-script generation feature #1

@natecook1000

Description

@natecook1000

ArgumentParser should have the ability to generate code-completion scripts for different shells. This should initially support zsh and bash, for feature parity with the SwiftPM's completion-tool command, but be extensible to other shell completion styles as well.

One design would be to mimic the automatically-provided --help flag with a --generate-completion-tool option, that would take the name of the shell as its value. We'll need to augment ArgumentHelp so that an author can indicate the kinds of completions that are available, such as filename or path completion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions