Lines Matching refs:new
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")
107 .arg(Arg::new("FIRST").help("First").num_args(1..).required(true))
109 Arg::new("SECOND")
135 let cmd = Command::new("flamegraph")
138 Arg::new("verbose")
145 Arg::new("timeout")
152 Arg::new("frequency")
159 Arg::new("binary path")
164 Arg::new("pass through args")
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")
370 Arg::new("all")
377 Arg::new("exact")
383 Arg::new("no_git_commit")
389 Arg::new("no_git_push")
413 let cmd = Command::new("test")
416 Arg::new("all")
423 Arg::new("exact")
429 Arg::new("no_git_commit")
435 Arg::new("no_git_push")
457 --possible-values-with-new-line <possible_values_with_new_line>
459 - long enough name to trigger new line:
464 --possible-values-without-new-line <possible_values_without_new_line>
472 let cmd = Command::new("test")
475 Arg::new("possible_values")
479 PossibleValue::new("short_name")
481 PossibleValue::new("second").help("Short help gets handled the same"),
485 Arg::new("possible_values_with_new_line")
486 .long("possible-values-with-new-line")
489 PossibleValue::new("long enough name to trigger new line").help(
492 PossibleValue::new("second"),
496 Arg::new("possible_values_without_new_line")
497 .long("possible-values-without-new-line")
500 PossibleValue::new("name").help("Short enough help message with no wrapping"),
501 PossibleValue::new("second").help("short help"),
549 let cmd = Command::new("ctest").version("0.1").term_width(70).arg(
550 Arg::new("cafe")
579 let cmd = Command::new("ctest")
582 Arg::new("pos")
591 Arg::new("cafe")
605 let cmd = Command::new("ctest")
608 Arg::new("pos")
615 PossibleValue::new("secret speed").hide(true),
621 Arg::new("cafe")
653 let app = Command::new("ctest")
656 Arg::new("pos")
661 PossibleValue::new("fast"),
662 PossibleValue::new("slow").help("not as fast"),
663 PossibleValue::new("secret speed").hide(true),
669 Arg::new("cafe")
690 let app = Command::new("ctest").arg(
691 Arg::new("pos")
694 PossibleValue::new("fast"),
695 PossibleValue::new("slow").help("not as fast"),
723 let cmd = Command::new("ctest")
726 .arg(Arg::new("cafe")
741 let _ = Command::new("ctest")
744 .arg(Arg::new("cafe")
769 let cmd = Command::new("ctest").version("0.1").term_width(24);
791 let cmd = Command::new("ctest")
794 .arg(Arg::new("mode").help(
820 let cmd = Command::new("ctest")
823 .arg(Arg::new("mode").help(
834 let cmd = Command::new("Example")
836 .subcommand(Command::new("update").arg(
837 Arg::new("force-non-host")
870 let cmd = Command::new("ctest").version("0.1").arg(
871 Arg::new("mode")
881 let cmd = Command::new("ctest").version("0.1").arg(
882 Arg::new("mode")
906 let app1 = Command::new("ctest")
910 .arg(Arg::new("filter")
918 let app2 = Command::new("ctest")
921 .arg(Arg::new("filter")
929 let app3 = Command::new("ctest")
932 .arg(Arg::new("filter")
959 let cmd = Command::new("myapp")
963 .arg(Arg::new("arg1").help("some option"))
965 Arg::new("arg2")
971 Arg::new("some")
978 Arg::new("other")
985 Arg::new("label")
1016 let cmd = Command::new("myapp")
1023 .arg(Arg::new("arg1").help("some option"));
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")
1131 .arg(Arg::new("PATH").help("help"))
1132 .subcommand(Command::new("test"));
1148 let cmd = Command::new("prog")
1152 .arg(Arg::new("pos").hide(true));
1176 let cmd = Command::new("prog")
1181 .arg(Arg::new("PATH").help("help"))
1182 .subcommand(Command::new("test"));
1201 let cmd = Command::new("prog")
1205 .arg(Arg::new("PATH").help("some"))
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")
1297 Command::new("conflict")
1298 .arg(Arg::new("help").short('?').action(ArgAction::SetTrue))
1306 Command::new("conflict")
1307 .arg(Arg::new("home").short('h').action(ArgAction::SetTrue))
1315 Command::new("conflict")
1317 Arg::new("custom-help")
1339 let cmd = Command::new("last")
1341 .arg(Arg::new("TARGET").required(true).help("some"))
1342 .arg(Arg::new("CORPUS").help("some"))
1344 Arg::new("ARGS")
1368 let cmd = Command::new("last")
1370 .arg(Arg::new("TARGET").required(true).help("some"))
1371 .arg(Arg::new("CORPUS").help("some"))
1373 Arg::new("ARGS")
1403 let cmd = Command::new("last")
1406 .arg(Arg::new("TARGET").required(true).help("some"))
1407 .arg(Arg::new("CORPUS").help("some"))
1409 Arg::new("ARGS")
1416 .subcommand(Command::new("test").about("some"));
1440 let cmd = Command::new("last")
1443 .arg(Arg::new("TARGET").required(true).help("some"))
1444 .arg(Arg::new("CORPUS").help("some"))
1446 Arg::new("ARGS")
1452 .subcommand(Command::new("test").about("some"));
1467 let app1 = Command::new("default").version("0.1").term_width(120).arg(
1468 Arg::new("argument")
1476 let app2 = Command::new("default").version("0.1").term_width(120).arg(
1477 Arg::new("argument")
1498 let app1 = Command::new("default").version("0.1").term_width(120).arg(
1499 Arg::new("argument")
1509 Command::new("test")
1513 Arg::new("help1")
1520 Command::new("foo").arg(
1521 Arg::new("help1")
1587 let cmd = Command::new("test")
1619 let cmd = Command::new("blorp")
1632 Arg::new("no-proxy")
1638 .args([Arg::new("port").long("port").action(ArgAction::SetTrue)]);
1668 let cmd = Command::new("blorp")
1681 Arg::new("no-proxy")
1702 Arg::new("server-addr")
1710 Arg::new("speed")
1740 let cmd = Command::new("blorp")
1746 Arg::new("no-proxy")
1766 Arg::new("server-addr")
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")
1836 .arg(Arg::new("foo").short('f').action(ArgAction::SetTrue))
1838 Arg::new("baz")
1844 Arg::new("files")
1867 let cmd = Command::new("test")
1868 .arg(Arg::new("arg1")
1870 .arg(Arg::new("arg2")
1872 .group(ArgGroup::new("group1")
1882 Command::new("myapp")
1884 .arg(Arg::new("foo"))
1893 Command::new("myapp")
1894 .arg(Arg::new("foo"))
1904 Command::new("myapp")
1906 .arg(Arg::new("foo"))
1907 .arg(Arg::new("bar").help("It does bar stuff"))
1915 Command::new("myapp")
1917 .arg(Arg::new("foo").help("It does foo stuff"))
1919 Command::new("bar")
1920 .arg(Arg::new("create").help("creates bar"))
1921 .arg(Arg::new("delete")),
1931 Command::new("myapp")
1933 .arg(Arg::new("foo").help("It does foo stuff"))
1935 Command::new("bar")
1936 .arg(Arg::new("create").help("creates bar"))
1937 .arg(Arg::new("delete")),
1945 Command::new("myapp")
1947 .arg(Arg::new("foo").help("It does foo stuff"))
1949 Command::new("bar")
1950 .arg(Arg::new("create").help("creates bar"))
1951 .arg(Arg::new("delete").help("deletes bar")),
1959 Command::new("myapp")
1961 .arg(Arg::new("foo").help("It does foo stuff"))
1968 Command::new("myapp")
1990 let cmd = Command::new("prog").arg(
1991 Arg::new("cfg")
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")
2078 Arg::new("someglobal")
2083 .subcommand(Command::new("subcmd").subcommand(Command::new("multi").version("1.0")));
2099 let cmd = Command::new("myapp")
2101 Arg::new("someglobal")
2106 .subcommand(Command::new("subcmd").subcommand(Command::new("multi").version("1.0")));
2125 let cmd = Command::new("myapp")
2127 Arg::new("someglobal")
2132 .subcommand(Command::new("subcmd").subcommand(Command::new("multi").version("1.0")));
2148 let cmd = Command::new("myapp")
2150 Arg::new("someglobal")
2155 .subcommand(Command::new("subcmd").subcommand(Command::new("multi").version("1.0")));
2176 let cmd = Command::new("order").args([
2177 Arg::new("a").short('a').action(ArgAction::SetTrue),
2178 Arg::new("B").short('B').action(ArgAction::SetTrue),
2179 Arg::new("b").short('b').action(ArgAction::SetTrue),
2180 Arg::new("save").short('s').action(ArgAction::SetTrue),
2181 Arg::new("select_file")
2184 Arg::new("select_folder")
2187 Arg::new("x").short('x').action(ArgAction::SetTrue),
2206 let cmd = Command::new("about-in-subcommands-list").subcommand(
2207 Command::new("sub")
2234 let cmd = clap::Command::new("hello")
2237 Arg::new("option1")
2241 .arg(Arg::new("pos1").action(ArgAction::Set))
2243 ArgGroup::new("arg1")
2247 .arg(Arg::new("pos2").action(ArgAction::Set));
2268 let cmd = Command::new("test")
2270 .arg(Arg::new("gear").help("Which gear"))
2272 .arg(Arg::new("speed").help("How fast"));
2286 let cmd = Command::new("test")
2306 let cmd = Command::new("test")
2312 .arg(Arg::new("speed").help("How fast"));
2319 let cmd = Command::new("my_app")
2320 .arg(Arg::new("some_arg").long("some_arg").num_args(2))
2322 Arg::new("some_arg_issue")
2344 let cmd = Command::new("test")
2346 .arg(Arg::new("arg1"))
2347 .arg(Arg::new("arg2").required(true));
2367 let cmd = Command::new("test")
2369 .arg(Arg::new("foo"))
2370 .arg(Arg::new("bar"))
2371 .arg(Arg::new("baz").action(ArgAction::Set).num_args(1..));
2392 let cmd = Command::new("test").arg(
2393 Arg::new("foo")
2413 let cmd = Command::new("test").arg(
2414 Arg::new("foo")
2438 let cmd = Command::new("test").arg(
2439 Arg::new("foo")
2460 let cmd = Command::new("test").arg(
2461 Arg::new("foo")
2486 let cmd = Command::new("test").arg(
2487 Arg::new("foo")
2511 Command::new("test")
2513 Arg::new("foo")
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")
2683 .arg(Arg::new("TARGET").required(true).help("some"))
2685 Arg::new("ARGS")
2690 .subcommand(Command::new("test").about("some"));
2704 let cmd = Command::new("parent")
2706 .arg(Arg::new("TARGET").required(true).help("some"))
2708 Arg::new("ARGS")
2713 .subcommand(Command::new("test").about("some"));
2727 let mut cmd = Command::new("parent")
2729 .arg(Arg::new("TARGET").required(true).help("some"))
2731 Arg::new("ARGS")
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")