Lines Matching refs:Command

3 use clap::{arg, builder::PossibleValue, error::ErrorKind, Arg, ArgAction, ArgGroup, Command};
7 fn setup() -> Command {
8 Command::new("test")
46 Command::new("test")
59 let cmd = Command::new("ctest").subcommand(
60 Command::new("subcmd").subcommand(
61 Command::new("multi")
105 let cmd = Command::new("example")
135 let cmd = Command::new("flamegraph")
250 let cmd = Command::new("clap-test")
290 let cmd = Command::new("clap-test")
315 let cmd = Command::new("ctest").subcommand(
316 Command::new("subcmd").subcommand(
317 Command::new("multi")
347 let cmd = Command::new("ctest").version("1.0").term_width(0);
367 let cmd = Command::new("test")
413 let cmd = Command::new("test")
472 let cmd = Command::new("test")
549 let cmd = Command::new("ctest").version("0.1").term_width(70).arg(
579 let cmd = Command::new("ctest")
605 let cmd = Command::new("ctest")
653 let app = Command::new("ctest")
690 let app = Command::new("ctest").arg(
723 let cmd = Command::new("ctest")
741 let _ = Command::new("ctest")
769 let cmd = Command::new("ctest").version("0.1").term_width(24);
791 let cmd = Command::new("ctest")
820 let cmd = Command::new("ctest")
834 let cmd = Command::new("Example")
836 .subcommand(Command::new("update").arg(
870 let cmd = Command::new("ctest").version("0.1").arg(
881 let cmd = Command::new("ctest").version("0.1").arg(
906 let app1 = Command::new("ctest")
918 let app2 = Command::new("ctest")
929 let app3 = Command::new("ctest")
959 let cmd = Command::new("myapp")
1016 let cmd = Command::new("myapp")
1040 let cmd = Command::new("ripgrep").version("0.5").override_usage(
1066 let cmd = Command::new("ripgrep")
1086 let cmd = Command::new("ripgrep")
1127 let cmd = Command::new("prog")
1132 .subcommand(Command::new("test"));
1148 let cmd = Command::new("prog")
1176 let cmd = Command::new("prog")
1182 .subcommand(Command::new("test"));
1201 let cmd = Command::new("prog")
1206 .subcommand(Command::new("test").hide(true));
1227 let cmd = Command::new("A cmd with a crazy very long long long name hahaha")
1246 let cmd = Command::new("test")
1265 let cmd = Command::new("test")
1284 let cmd = Command::new("test")
1295 #[should_panic = "Command conflict: Argument names must be unique, but 'help' is in use by more than one argument or group (call `cmd.disable_help_flag(true)` to remove the auto-generated `--help`)"]
1297 Command::new("conflict")
1304 #[should_panic = "Command conflict: Short option names must be unique for each argument, but '-h' is in use by both 'home' and 'help' (call `cmd.disable_help_flag(true)` to remove the auto-generated `--help`)"]
1306 Command::new("conflict")
1313 #[should_panic = "Command conflict: Long option names must be unique for each argument, but '--help' is in use by both 'custom-help' and 'help' (call `cmd.disable_help_flag(true)` to remove the auto-generated `--help`)"]
1315 Command::new("conflict")
1339 let cmd = Command::new("last")
1368 let cmd = Command::new("last")
1403 let cmd = Command::new("last")
1416 .subcommand(Command::new("test").about("some"));
1440 let cmd = Command::new("last")
1452 .subcommand(Command::new("test").about("some"));
1467 let app1 = Command::new("default").version("0.1").term_width(120).arg(
1476 let app2 = Command::new("default").version("0.1").term_width(120).arg(
1498 let app1 = Command::new("default").version("0.1").term_width(120).arg(
1508 fn issue_1112_setup() -> Command {
1509 Command::new("test")
1520 Command::new("foo").arg(
1587 let cmd = Command::new("test")
1619 let cmd = Command::new("blorp")
1668 let cmd = Command::new("blorp")
1740 let cmd = Command::new("blorp")
1792 let cmd = Command::new("ctest").version("0.1").subcommand(
1793 Command::new("foo")
1813 let cmd = Command::new("ctest").version("0.1").subcommand(
1814 Command::new("foo")
1835 let cmd = Command::new("demo")
1867 let cmd = Command::new("test")
1880 #[should_panic = "Command::help_expected is enabled for the Command"]
1882 Command::new("myapp")
1891 #[should_panic = "Command::help_expected is enabled for the Command"]
1893 Command::new("myapp")
1902 #[should_panic = "Command::help_expected is enabled for the Command"]
1904 Command::new("myapp")
1915 Command::new("myapp")
1919 Command::new("bar")
1929 #[should_panic = "Command::help_expected is enabled for the Command"]
1931 Command::new("myapp")
1935 Command::new("bar")
1945 Command::new("myapp")
1949 Command::new("bar")
1959 Command::new("myapp")
1968 Command::new("myapp")
1990 let cmd = Command::new("prog").arg(
2012 let mut cmd = Command::new("myapp")
2034 let cmd = Command::new("myapp")
2035 .subcommand(Command::new("subcmd").subcommand(Command::new("multi").version("1.0")));
2051 let cmd = Command::new("myapp")
2052 .subcommand(Command::new("subcmd").subcommand(Command::new("multi").version("1.0")));
2076 let cmd = Command::new("myapp")
2083 .subcommand(Command::new("subcmd").subcommand(Command::new("multi").version("1.0")));
2099 let cmd = Command::new("myapp")
2106 .subcommand(Command::new("subcmd").subcommand(Command::new("multi").version("1.0")));
2125 let cmd = Command::new("myapp")
2132 .subcommand(Command::new("subcmd").subcommand(Command::new("multi").version("1.0")));
2148 let cmd = Command::new("myapp")
2155 .subcommand(Command::new("subcmd").subcommand(Command::new("multi").version("1.0")));
2176 let cmd = Command::new("order").args([
2206 let cmd = Command::new("about-in-subcommands-list").subcommand(
2207 Command::new("sub")
2234 let cmd = clap::Command::new("hello")
2268 let cmd = Command::new("test")
2286 let cmd = Command::new("test")
2306 let cmd = Command::new("test")
2319 let cmd = Command::new("my_app")
2344 let cmd = Command::new("test")
2367 let cmd = Command::new("test")
2392 let cmd = Command::new("test").arg(
2413 let cmd = Command::new("test").arg(
2438 let cmd = Command::new("test").arg(
2460 let cmd = Command::new("test").arg(
2486 let cmd = Command::new("test").arg(
2511 Command::new("test")
2525 let res = Command::new("foo")
2526 .subcommand(Command::new("sub"))
2536 let res = Command::new("foo")
2537 .subcommand(Command::new("sub"))
2553 let cmd = Command::new("bar")
2554 .subcommand(Command::new("help").arg(Arg::new("arg").action(ArgAction::Set)))
2555 .subcommand(Command::new("not_help").arg(Arg::new("arg").action(ArgAction::Set)))
2570 let cmd = Command::new("foo")
2571 .subcommand(Command::new("help").long_flag("help"))
2580 let cmd = Command::new("foo")
2583 .subcommand(Command::new("help").short_flag('h'));
2592 let cmd = Command::new("example").subcommand(Command::new("test").about("Subcommand"));
2611 let mut cmd = Command::new("test_app")
2613 .subcommand(Command::new("test").about("Subcommand"));
2631 let cmd = clap::Command::new("example")
2634 .subcommand(clap::Command::new("subcommand"));
2655 let mut cmd = clap::Command::new("test")
2681 let cmd = Command::new("parent")
2690 .subcommand(Command::new("test").about("some"));
2704 let cmd = Command::new("parent")
2713 .subcommand(Command::new("test").about("some"));
2727 let mut cmd = Command::new("parent")
2736 .subcommand(Command::new("test").about("some"));
2753 let cmd = Command::new("ctest")
2756 .subcommand(Command::new("subcmd"));
2769 let cmd = Command::new("ctest")
2772 .subcommand(Command::new("subcmd"));
2778 let cmd = Command::new("ctest")
2786 let mut cmd = Command::new("app").bin_name("app.exe");
2793 let mut cmd = Command::new("app")
2802 let mut cmd = Command::new("parent").subcommand(Command::new("child").bin_name("child.exe"));
2812 let mut cmd = Command::new("parent").subcommand(
2813 Command::new("child")