Skip to content

Native bash-completion 2 loader using complete -D #1220

Open
@kislyuk

Description

@kislyuk

Argcomplete uses complete -D to register its loader as a general purpose loader that can match any command name:

https://github.com/kislyuk/argcomplete/blob/develop/argcomplete/bash_completion.d/_python-argcomplete#L245

This works fine in bash-completion 1, and in the compatibility mode directory (BASH_COMPLETION_COMPAT_DIR) in bash-completion 2, but not in native mode bash-completion 2 (since the main completion loader, _comp_load(), matches commands to completer filenames by name to implement lazy loading, so registering a completer to match any name seems impossible).

Is there a way to use the bash-completion 2 lazy loader to register a wildcard completer? I'm worried that if I stick with the bash-completion 1 style completer, it will eventually get deprecated.

Thanks 😄

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