1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! Generate a bash completion script for kaish's `echo` builtin from its
//! clap_derive struct. Proof-of-life for the clap-migration sweep — every
//! builtin's argv layer is a clap::Command, so clap_complete can generate
//! shell completions for them automatically.
//!
//! Run with:
//! ```bash
//! cargo run --example gen_bash_completion -p kaish-kernel > contrib/echo.bash
//! ```
//!
//! The struct below mirrors `crates/kaish-kernel/src/tools/builtin/echo.rs`.
//! Builtins' clap structs are module-private; this example duplicates the
//! shape so a third-party project can regenerate completions without depending
//! on internal kernel modules.
use ;
use ;