-
-
Notifications
You must be signed in to change notification settings - Fork 46
/
install.go
27 lines (23 loc) · 1.03 KB
/
install.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
var installCmd = &cobra.Command{
Use: "install",
Short: "Install New Relic.",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(installCmd).Standalone()
installCmd.Flags().BoolP("assumeYes", "y", false, "use \"yes\" for all questions during install")
installCmd.Flags().String("localRecipes", "", "a path to local recipes to load instead of service other fetching")
installCmd.Flags().StringSliceP("recipe", "n", []string{}, "the name of a recipe to install")
installCmd.Flags().StringSliceP("recipePath", "c", []string{}, "the path to a recipe file to install")
installCmd.Flags().StringSlice("tag", []string{}, "the tags to add during install, can be multiple. Example: --tag tag1:test,tag2:test")
installCmd.Flags().BoolP("testMode", "t", false, "fakes operations for UX testing")
rootCmd.AddCommand(installCmd)
carapace.Gen(installCmd).FlagCompletion(carapace.ActionMap{
"recipePath": carapace.ActionDirectories(),
})
}