sxcli.devSimple Extensible CLI
You are viewing an archived snapshot (v0.1.0). Switch to the current version →

sxcli.dev/completion

go
go
import "sxcli.dev/completion"

Package completion provides shell completion for binaries built on sxcli.dev/fw, as an ordinary ecosystem module: it consumes the framework's Introspector API and registers one System applet per supported shell — nothing here is, or needs to be, part of the core.

Each shell lives in its own package, selected by blank import exactly like the framework's log sinks — a binary links only the shells it wants to support:

code
text
import (
    _ "sxcli.dev/completion/bash"
    _ "sxcli.dev/completion/zsh"
)

The shared candidate computation is the public engine package and the --script generation policy is the public script package; the per-shell packages are thin adapters owning only their registration script template and answer encoding. Third-party shell adapters build on the same two packages — see the engine package documentation.

Index#