Lines Matching refs:rootCmd

38 	rootCmd := &Command{
68 rootCmd.AddCommand(childCmd1, childCmd2, hiddenCmd, deprecatedCmd, aliasedCmd)
71 output, err := executeCommand(rootCmd, ShellCompNoDescRequestCmd, "")
89 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "s")
105 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "test")
119 output, err = executeCommand(rootCmd, ShellCompRequestCmd, "")
138 rootCmd := &Command{
142 rootCmd.Flags().String("localroot", "", "local root flag")
150 rootCmd.AddCommand(childCmd1)
163 output, err := executeCommand(rootCmd, ShellCompNoDescRequestCmd, "childCmd1", "arg1", "")
177 …output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "childCmd1", "--nonPersistent", "…
194 rootCmd.TraverseChildren = true
196 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "--localroot", "value", "")
201 rootCmd.TraverseChildren = false
215 rootCmd.TraverseChildren = true
217 …output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "--localroot", "value", "childCmd…
222 rootCmd.TraverseChildren = false
237 …output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "--localroot", "value", "childCmd…
251 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "childCmd1", "-n", "value", "")
267 …output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "childCmd1", "--persistent", "val…
284 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "childCmd1", "-p", "value", "")
302 rootCmd := &Command{
309 output, err := executeCommand(rootCmd, ShellCompNoDescRequestCmd, "")
326 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "o")
341 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "one", "")
356 rootCmd := &Command{
367 rootCmd.AddCommand(childCmd)
370 output, err := executeCommand(rootCmd, ShellCompNoDescRequestCmd, "")
388 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "t")
405 rootCmd := &Command{
417 rootCmd.AddCommand(childCmd)
420 output, err := executeCommand(rootCmd, ShellCompNoDescRequestCmd, "")
438 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "t")
454 output, err = executeCommand(rootCmd, ShellCompRequestCmd, "t")
471 rootCmd := &Command{
479 rootCmd.AddCommand(childCmd)
481 rootCmd.Flags().IntP("first", "f", -1, "first flag")
482 rootCmd.PersistentFlags().BoolP("second", "s", false, "second flag")
486 output, err := executeCommand(rootCmd, ShellCompNoDescRequestCmd, "")
502 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "-")
520 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "--f")
535 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "childCmd", "-")
553 rootCmd := &Command{
562 rootCmd.AddCommand(childCmd)
564 rootCmd.Flags().IntP("first", "f", -1, "first flag\nlonger description for flag")
565 rootCmd.PersistentFlags().BoolP("second", "s", false, "second flag")
569 output, err := executeCommand(rootCmd, ShellCompRequestCmd, "")
585 output, err = executeCommand(rootCmd, ShellCompRequestCmd, "-")
603 output, err = executeCommand(rootCmd, ShellCompRequestCmd, "--f")
618 output, err = executeCommand(rootCmd, ShellCompRequestCmd, "childCmd", "-")
636 rootCmd := &Command{
645 rootCmd.AddCommand(childCmd)
647 rootCmd.Flags().IntP("first", "f", -1, "first flag")
648 firstFlag := rootCmd.Flags().Lookup("first")
649 rootCmd.Flags().BoolP("second", "s", false, "second flag")
650 secondFlag := rootCmd.Flags().Lookup("second")
651 rootCmd.Flags().StringArrayP("array", "a", nil, "array flag")
652 arrayFlag := rootCmd.Flags().Lookup("array")
653 rootCmd.Flags().IntSliceP("slice", "l", nil, "slice flag")
654 sliceFlag := rootCmd.Flags().Lookup("slice")
655 rootCmd.Flags().BoolSliceP("bslice", "b", nil, "bool slice flag")
656 bsliceFlag := rootCmd.Flags().Lookup("bslice")
659 output, err := executeCommand(rootCmd, ShellCompNoDescRequestCmd, "--first", "1", "--")
679 …output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "--first", "1", "--second=false",…
699 …output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "--slice", "1", "--slice=2", "--a…
722 …output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "-l", "1", "-l=2", "-a", "val", "…
749 …output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "-l", "1", "-l=2", "-a", "val", "…
768 rootCmd := &Command{
780 rootCmd.AddCommand(childCmd)
782 rootCmd.Flags().IntP("requiredFlag", "r", -1, "required flag")
783 assertNoErr(t, rootCmd.MarkFlagRequired("requiredFlag"))
784 requiredFlag := rootCmd.Flags().Lookup("requiredFlag")
786 rootCmd.PersistentFlags().IntP("requiredPersistent", "p", -1, "required persistent")
787 assertNoErr(t, rootCmd.MarkPersistentFlagRequired("requiredPersistent"))
788 requiredPersistent := rootCmd.PersistentFlags().Lookup("requiredPersistent")
790 rootCmd.Flags().StringP("release", "R", "", "Release name")
797 output, err := executeCommand(rootCmd, ShellCompNoDescRequestCmd, "")
818 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "-")
836 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "--relea")
851 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "childCmd", "")
869 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "childCmd", "-")
886 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "childCmd", "--subNot")
901 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "--requiredFlag", "1", "")
920 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "--requiredPersistent", "1", "")
941 …output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "--requiredFlag", "1", "--require…
960 rootCmd := &Command{
966 rootCmd.Flags().StringP("file", "f", "", "file flag")
967 assertNoErr(t, rootCmd.MarkFlagFilename("file"))
970 rootCmd.Flags().StringP("log", "l", "", "log flag")
971 assertNoErr(t, rootCmd.MarkFlagFilename("log", "log"))
974 rootCmd.Flags().StringP("yaml", "y", "", "yaml flag")
975 assertNoErr(t, rootCmd.MarkFlagFilename("yaml", "yaml", "yml"))
978 rootCmd.Flags().StringP("text", "t", "", "text flag")
979 assertNoErr(t, rootCmd.Flags().SetAnnotation("text", BashCompFilenameExt, []string{"txt"}))
983 output, err := executeCommand(rootCmd, ShellCompNoDescRequestCmd, "--file", "")
996 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "--log", "")
1010 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "--yaml", "")
1024 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "--yaml=")
1038 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "-y", "")
1052 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "-y=")
1066 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "--text", "")
1082 rootCmd := &Command{
1088 rootCmd.Flags().StringP("dir", "d", "", "dir flag")
1089 assertNoErr(t, rootCmd.MarkFlagDirname("dir"))
1092 rootCmd.Flags().StringP("subdir", "s", "", "subdir")
1093 assertNoErr(t, rootCmd.Flags().SetAnnotation("subdir", BashCompSubdirsInDir, []string{"themes"}))
1096 rootCmd.Flags().StringP("manydir", "m", "", "manydir")
1097 …assertNoErr(t, rootCmd.Flags().SetAnnotation("manydir", BashCompSubdirsInDir, []string{"themes", "…
1101 output, err := executeCommand(rootCmd, ShellCompNoDescRequestCmd, "--dir", "")
1114 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "-d", "")
1127 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "--subdir", "")
1141 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "--subdir=")
1155 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "-s", "")
1169 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "-s=")
1183 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "--manydir", "")
1198 rootCmd := &Command{
1205 output, err := executeCommand(rootCmd, ShellCompNoDescRequestCmd, "")
1221 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "t")
1237 rootCmd := &Command{
1249 output, err := executeCommand(rootCmd, ShellCompNoDescRequestCmd, "unexpectedArg", "t")
1264 rootCmd := &Command{Use: "root", Args: NoArgs, Run: emptyRun}
1275 rootCmd.AddCommand(child1Cmd, child2Cmd)
1278 output, err := executeCommand(rootCmd, ShellCompNoDescRequestCmd, "child1", "")
1294 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "child1", "t")
1309 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "child1", "unexpectedArg", "t")
1323 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "child2", "")
1338 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "child2", "t")
1353 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "child2", "unexpectedArg", "t")
1368 rootCmd := &Command{Use: "root", Args: NoArgs, Run: emptyRun}
1375 rootCmd.AddCommand(child)
1378 output, err := executeCommand(rootCmd, ShellCompNoDescRequestCmd, "son", "")
1394 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "daughter", "t")
1409 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "son", "unexpectedArg", "t")
1424 rootCmd := &Command{Use: "root", Args: NoArgs, Run: emptyRun}
1430 rootCmd.AddCommand(child)
1433 assertNoErr(t, rootCmd.GenBashCompletion(buf))
1440 rootCmd := &Command{Use: "root", Args: NoArgs, Run: emptyRun}
1445 rootCmd.AddCommand(child)
1448 assertNoErr(t, rootCmd.GenBashCompletion(buf))
1455 rootCmd := &Command{Use: "root", Args: NoArgs, Run: emptyRun}
1461 rootCmd.AddCommand(child)
1464 assertNoErr(t, rootCmd.GenBashCompletion(buf))
1471 rootCmd := &Command{Use: "root", Args: NoArgs, Run: emptyRun}
1477 rootCmd.AddCommand(child)
1480 assertNoErr(t, rootCmd.GenZshCompletionNoDesc(buf))
1487 rootCmd := &Command{Use: "root", Args: NoArgs, Run: emptyRun}
1493 rootCmd.AddCommand(child)
1496 assertNoErr(t, rootCmd.GenZshCompletion(buf))
1504 rootCmd := &Command{
1508 rootCmd.Flags().IntP("introot", "i", -1, "help message for flag introot")
1509 …assertNoErr(t, rootCmd.RegisterFlagCompletionFunc("introot", func(cmd *Command, args []string, toC…
1518 rootCmd.Flags().String("filename", "", "Enter a filename")
1519 …assertNoErr(t, rootCmd.RegisterFlagCompletionFunc("filename", func(cmd *Command, args []string, to…
1530 output, err := executeCommand(rootCmd, ShellCompNoDescRequestCmd, "--introot", "")
1547 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "--introot", "1")
1563 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "--filename", "")
1580 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "--filename", "f")
1597 rootCmd := &Command{Use: "root", Args: NoArgs, Run: emptyRun}
1608 rootCmd.AddCommand(child1Cmd, child2Cmd)
1611 output, err := executeCommand(rootCmd, ShellCompRequestCmd, "child1", "")
1627 output, err = executeCommand(rootCmd, ShellCompRequestCmd, "child1", "t")
1642 output, err = executeCommand(rootCmd, ShellCompRequestCmd, "child1", "unexpectedArg", "t")
1656 output, err = executeCommand(rootCmd, ShellCompRequestCmd, "child2", "")
1671 output, err = executeCommand(rootCmd, ShellCompRequestCmd, "child2", "t")
1686 output, err = executeCommand(rootCmd, ShellCompRequestCmd, "child2", "unexpectedArg", "t")
1701 rootCmd := &Command{
1705 rootCmd.Flags().IntP("introot", "i", -1, "help message for flag introot")
1706 …assertNoErr(t, rootCmd.RegisterFlagCompletionFunc("introot", func(cmd *Command, args []string, toC…
1715 rootCmd.Flags().String("filename", "", "Enter a filename")
1716 …assertNoErr(t, rootCmd.RegisterFlagCompletionFunc("filename", func(cmd *Command, args []string, to…
1727 output, err := executeCommand(rootCmd, ShellCompRequestCmd, "--introot", "")
1744 output, err = executeCommand(rootCmd, ShellCompRequestCmd, "--introot", "1")
1760 output, err = executeCommand(rootCmd, ShellCompRequestCmd, "--filename", "")
1777 output, err = executeCommand(rootCmd, ShellCompRequestCmd, "--filename", "f")
1794 rootCmd := &Command{
1805 output, err := executeCommand(rootCmd, ShellCompNoDescRequestCmd, "")
1821 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "t")
1837 rootCmd := &Command{
1846 output, err := executeCommand(rootCmd, ShellCompNoDescRequestCmd, "")
1863 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "t")
1879 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "tr")
1895 rootCmd := &Command{Use: "root", Args: NoArgs, Run: emptyRun}
1904 rootCmd.AddCommand(child1Cmd, child2Cmd)
1913 output, err := executeCommand(rootCmd, ShellCompNoDescRequestCmd, "")
1930 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "help", "")
1947 output, err = executeCommand(rootCmd, ShellCompNoDescRequestCmd, "help", "child1", "")