Skip to content
This repository was archived by the owner on Oct 5, 2020. It is now read-only.
This repository was archived by the owner on Oct 5, 2020. It is now read-only.

Add support for auto-bash completion #18

@cmccandless

Description

@cmccandless

See this gist.

Note: since by design argutil requires commandline.json, it may be simply or more accurate to build completion suggestions using that file instead of traversing the parser tree (as in above gist).

Suggested API for new functionality:

class ArgutilParser(argutil.ArgumentParser):
    def __init__(self, definition, *args, **kwargs):
        argutil.ArgumentParser.__init__(self, *args, **kwargs)
        self.definition = definition

    def suggest_next(self, argv):
        return ...  # List of valid arguments

## __build_parser__(...) should now return ArgutilParser instead of argutil.ArgumentParser

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions