The command path clap matched, such as `git import`.
(matches: &clap::ArgMatches)
| 256 | |
| 257 | /// The command path clap matched, such as `git import`. |
| 258 | fn command_path(matches: &clap::ArgMatches) -> String { |
| 259 | let mut names = Vec::new(); |
| 260 | let mut current = matches; |
| 261 | while let Some((name, sub)) = current.subcommand() { |
| 262 | names.push(name); |
| 263 | current = sub; |
| 264 | } |
| 265 | names.join(" ") |
| 266 | } |
| 267 | |
| 268 | fn terminal_layer() -> BoxedLayer { |
| 269 | let directives = terminal_directives(std::env::var("RUST_LOG").ok(), verbose_requested()); |