|
| 1 | +package cmd |
| 2 | + |
| 3 | +import ( |
| 4 | + "github.com/carapace-sh/carapace" |
| 5 | + "github.com/spf13/cobra" |
| 6 | +) |
| 7 | + |
| 8 | +var rootCmd = &cobra.Command{ |
| 9 | + Use: "declare", |
| 10 | + Short: "Declare variables and give them attributes", |
| 11 | + Run: func(cmd *cobra.Command, args []string) {}, |
| 12 | +} |
| 13 | + |
| 14 | +func Execute() error { |
| 15 | + return rootCmd.Execute() |
| 16 | +} |
| 17 | +func init() { |
| 18 | + carapace.Gen(rootCmd).Standalone() |
| 19 | + |
| 20 | + rootCmd.Flags().BoolS("A", "A", false, "each name is an associative array variable") |
| 21 | + rootCmd.Flags().BoolS("F", "F", false, "inhibit the display of function definitions") |
| 22 | + rootCmd.Flags().BoolS("I", "I", false, "inherit the attributes and value of any existing variable with the same name") |
| 23 | + rootCmd.Flags().BoolS("a", "a", false, "each name is an indexed array variable") |
| 24 | + rootCmd.Flags().BoolS("f", "f", false, "each name refers to a shell function") |
| 25 | + rootCmd.Flags().BoolS("g", "g", false, "forces variables to be created or modified at the global scope") |
| 26 | + rootCmd.Flags().BoolS("i", "i", false, "the variable is to be treated as an integer") |
| 27 | + rootCmd.Flags().BoolS("l", "l", false, "all upper-case characters are converted to lower-case") |
| 28 | + rootCmd.Flags().BoolS("n", "n", false, "give each name the nameref attribute") |
| 29 | + rootCmd.Flags().BoolS("p", "p", false, "option will display the attributes and values of each name") |
| 30 | + rootCmd.Flags().BoolS("r", "r", false, "make names readonly") |
| 31 | + rootCmd.Flags().BoolS("t", "t", false, "give each name the trace attribute") |
| 32 | + rootCmd.Flags().BoolS("u", "u", false, "all lower-case characters are converted to upper-case") |
| 33 | + rootCmd.Flags().BoolS("x", "x", false, "mark each name for export to subsequent commands via the environment") |
| 34 | + |
| 35 | + // TODO shell.Variables |
| 36 | +} |
0 commit comments