Skip to content

Autocomplete could work better #2

@harro

Description

@harro

Target device auto completion is achieved via the textfsm template selection process:

https://github.com/google/textfsm/blob/master/testdata/default_index

Autocomplete works across the set of candidate 'Commands'. We reuse the template matching logic for the autocompletion (even if we are not making use of the template to displaying the data), hence we get it for free, and we avoid having to know anything about the target device. As soon as the template selection is exhausted, or we hit a regexp entry like .* then the autocomplete dries up. This is by design.

If we assume a regexp in default_index represents a single argument, then it should be possible to resume command completion.
So entries like

show .* optical
show .* detail

Would give valid completions for:

show xe-0-0-0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions