nu_scripts/modules/completion-generator
fj0r 55ef44ad3e
generate completions from tree-shaped data (#683)
it might be too trivial to manually create a completion. in many
scenarios, completion is a tree-shaped structure - the current candidate
is influenced by the previous candidate.

`completion-generator` generate completion through tree-like structures
````
{a: {b: {c: {d: 1 e: 2}
````
it uses existing positional arguments as a breadcrumbs to select
candidates in tree structures

as an example, `completion-generator flare` to create completion from
online json data

`completion-generator` supports different structural expressions
````
{value: desc}
{value: { next : ...}
[a b c ...]
[{value: a, description: b, next: [...]]
{|path| ...}
````

these different structures allow any kind of nesting

Co-authored-by: nash <nash@iffy.me>
2023-12-01 19:44:40 -06:00
..
completion-generator.nu generate completions from tree-shaped data (#683) 2023-12-01 19:44:40 -06:00