-
Notifications
You must be signed in to change notification settings - Fork 5
Description
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