Lines Matching refs:Command

1 use clap::{arg, error::ErrorKind, Arg, ArgAction, Command};
7 let m = Command::new("test")
9 Command::new("some").arg(
32 let m = Command::new("test")
34 Command::new("some").arg(
51 let m = Command::new("test")
53 Command::new("some").arg(
60 Command::new("add").arg(Arg::new("roster").short('r')),
79 let m = Command::new("myprog")
80 .subcommand(Command::new("test").alias("do-stuff"))
88 let m = Command::new("myprog")
89 .subcommand(Command::new("test").aliases(["do-stuff", "test-stuff"]))
111 let cmd = Command::new("dym").subcommand(Command::new("subcmd"));
131 let cmd = Command::new("dym")
132 .subcommand(Command::new("test"))
133 .subcommand(Command::new("temp"));
151 let cmd = Command::new("dym")
152 .subcommand(Command::new("subcmd").arg(arg!(-s --subcmdarg <subcmdarg> "tests")));
169 let cmd = Command::new("dym")
170 .subcommand(Command::new("subcmd").arg(arg!(-s --subcmdarg <subcmdarg> "tests")));
177 let m = Command::new("myprog")
178 .subcommand(Command::new("test").alias("do-stuff"))
198 let cmd = Command::new("clap-test").version("2.6").subcommand(
199 Command::new("test")
222 let cmd = Command::new("clap-test")
224 .subcommand(Command::new("test").about("Some help").alias("invisible"));
231 let m = Command::new("prog")
233 Command::new("module").subcommand(Command::new("install").about("Install module")),
248 let res = Command::new("prog")
250 .subcommand(Command::new("signer"))
263 let res = Command::new("prog")
265 .subcommand(Command::new("signer"))
280 let res = Command::new("myprog")
323 let m = Command::new("myprog")
324 .subcommand(Command::new("subcommand"))
335 let mut cmd = Command::new("myprog")
336 .subcommand(Command::new("subcommand"))
363 let cmd = Command::new("cmd").subcommand(Command::new("subcmd"));
370 let m = Command::new("myprog")
372 .subcommand(Command::new("test"))
384 let m = Command::new("myprog")
386 .subcommand(Command::new("test"))
398 let cmd = Command::new("opt")
400 .subcommand(Command::new("global"));
424 let cmd = Command::new("fake")
425 .subcommand(Command::new("sub"))
443 fn applet_commands() -> [Command; 2] {
444 [Command::new("true"), Command::new("false")]
446 let cmd = Command::new("busybox")
448 .subcommand(Command::new("busybox").subcommands(applet_commands()))
468 let mut cmd = Command::new("hostname")
470 .subcommand(Command::new("hostname"))
471 .subcommand(Command::new("dnsdomainname"));
495 let cmd = Command::new("repl")
499 .subcommand(Command::new("foo"))
500 .subcommand(Command::new("bar"));
546 #[should_panic = "Command repl: Arguments like oh-no cannot be set on a multicall command"]
548 let mut cmd = Command::new("repl")
552 .subcommand(Command::new("foo"))
553 .subcommand(Command::new("bar"))
570 let cmd = Command::new("repl")
574 .subcommand(Command::new("foo").subcommand(Command::new("bar").arg(Arg::new("value"))));
590 let cmd = Command::new("repl")
594 .subcommand(Command::new("foo").subcommand(Command::new("bar").arg(Arg::new("value"))));
610 let mut cmd = Command::new("repl")
614 .subcommand(Command::new("foo").subcommand(Command::new("bar").arg(Arg::new("value"))));
624 #[should_panic = "Command test: command name `repeat` is duplicated"]
626 Command::new("test")
627 .subcommand(Command::new("repeat"))
628 .subcommand(Command::new("repeat"))
633 #[should_panic = "Command test: command `unique` alias `repeat` is duplicated"]
635 Command::new("test")
636 .subcommand(Command::new("repeat"))
637 .subcommand(Command::new("unique").alias("repeat"))