run the `__complete` probe subprocess in its own session so that a
cobra-incompatible binary that ignores `__complete` can't mess with the
user's controlling terminal.
tested on both macos and nixos.
encountered the problem while trying to use
[visidata](https://www.visidata.org/).
---------
Co-authored-by: shemishtamesh <shemishtamail@gmail.com>
Introduces dynamic completion inference for Cobra-based CLIs using the
hidden `__complete` subcommand. Iris can now automatically suggest
subcommands and flags for commands without hand-written specs.
Completions are structured, cached by binary modification time
(`mtime`), and safely isolated from hand-written specs.
Try testing with un-specced commands:
- `gh repo ` (suggests `clone`, `fork`, `sync`...)
- `kubectl get ` (suggests `pods`, `nodes`, `configmaps`...)
- `golangci-lint ` (suggests `run`, `fmt`, `linters`...)