Expand description
One completion engine, for every surface.
A shell adapter parses the line it is completing and renders what comes back. It knows
no commands, no flags, no identifiers and no repository: it forwards a
Request and prints a Response. Everything else happens here, over the command
graph, which is why just <TAB>, majordomus <TAB> and ./bin/majordomus <TAB> cannot
disagree about what exists — they are three spellings resolved against one graph by one
function.
zsh / bash / fish
│ words, cursor
▼
generic adapter ──► majordomus completion query ──► CompletionEngine
│
CommandGraph + value sources§What it will not do
- No network. A value that can only be learned remotely is not offered.
- No secret. An argument classified as a secret is never enumerated, and its value never enters a candidate, a cache or a log.
- No dependence on a server. A running server may make a value source faster; a stopped one changes nothing. Nothing here starts one.
Structs§
- Candidate
- One thing the caller may type next.
- NoValues
- A resolver that answers nothing.
- Request
- What a shell asks.
- Response
- What the engine answers.
Enums§
- Candidate
Kind - What kind of thing a candidate is, so a shell that groups its menu can.
Traits§
- Value
Resolver - Where a value that is not in the declaration comes from.
Functions§
- complete
- Complete one line.