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
39
40
//! `net-mesh completion <shell>` — emit a shell-completion script
//! for the requested shell on stdout.
//!
//! Operators wire this into their shell init or — via the release
//! tarball — get pre-generated scripts under
//! `share/{bash-completion,zsh,fish,powershell}/`. The runtime
//! subcommand lets users who installed via `cargo install` or
//! `cargo binstall` (which skip the tarball's `share/` payload)
//! pull completions on demand:
//!
//! ```sh
//! net-mesh completion bash > /etc/bash_completion.d/net-mesh
//! net-mesh completion zsh > "$fpath[1]/_net-mesh"
//! net-mesh completion fish > ~/.config/fish/completions/net-mesh.fish
//! net-mesh completion powershell | Out-String | Invoke-Expression
//! ```
//!
//! The tarball-build workflow shells out to the freshly-compiled
//! binary on the native runner to capture each shell's script into
//! `share/`, so cross-compiled targets ship the same completion
//! files (they're shell scripts, not architecture-dependent).
use CommandFactory;
use ;
use crateCliError;