Autocomplete could work better
- Vorherrschende Sprache
- Python
- Sterne
- 9
- Forks
- 6
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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
Beitragsleitfaden
Rechercherichtung
Beginne mit der Autovervollständigungs- und Vorlagenauswahllogik und untersuche anschließend testdata/default_index und dessen regexp-Einträge. Verfolge, wie sich die Vervollständigung nach einem regexp wie `show .* optical` oder `show .* detail` verhält; die Aufgabe ist abgeschlossen, wenn ein Kandidat wie `show xe-0-0-0 ` weiterhin die verbleibende gültige Befehlsvervollständigung erzeugt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- cli
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100