diff --git a/cmd/cue/cmd/cmd.go b/cmd/cue/cmd/cmd.go index 75f394770..714c5f6a4 100644 --- a/cmd/cue/cmd/cmd.go +++ b/cmd/cue/cmd/cmd.go @@ -25,7 +25,7 @@ import ( func newCmdCmd(c *Command) *cobra.Command { cmd := &cobra.Command{ - Use: "cmd [inputs]", + Use: "cmd [flags] [inputs]", Short: "run a user-defined workflow command", Long: `cmd executes the named workflow command for each of the named instances. diff --git a/cmd/cue/cmd/def.go b/cmd/cue/cmd/def.go index 4d34de288..3e4f28582 100644 --- a/cmd/cue/cmd/def.go +++ b/cmd/cue/cmd/def.go @@ -24,12 +24,15 @@ import ( // newDefCmd creates a new eval command func newDefCmd(c *Command) *cobra.Command { cmd := &cobra.Command{ - Use: "def", + Use: "def [flags] [inputs]", Short: "print consolidated definitions", Long: `def prints consolidated configuration as a single file. Printing is skipped if validation fails. +Input arguments can be CUE packages, CUE files, non-CUE files, or some +combinations of those. See "cue help inputs" for more detail. + The --expression flag is used to only print parts of a configuration. `, RunE: mkRunE(c, runDef), diff --git a/cmd/cue/cmd/eval.go b/cmd/cue/cmd/eval.go index 2b725529b..39f9dee88 100644 --- a/cmd/cue/cmd/eval.go +++ b/cmd/cue/cmd/eval.go @@ -30,12 +30,15 @@ import ( // newEvalCmd creates a new eval command func newEvalCmd(c *Command) *cobra.Command { cmd := &cobra.Command{ - Use: "eval", + Use: "eval [flags] [inputs]", Short: "evaluate and print a configuration", Long: `eval evaluates, validates, and prints a configuration. Printing is skipped if validation fails. +Input arguments can be CUE packages, CUE files, non-CUE files, or some +combinations of those. See "cue help inputs" for more detail. + The --expression flag is used to evaluate an expression within the configuration file, instead of the entire configuration file itself. diff --git a/cmd/cue/cmd/export.go b/cmd/cue/cmd/export.go index b927bbc06..510fd490e 100644 --- a/cmd/cue/cmd/export.go +++ b/cmd/cue/cmd/export.go @@ -24,7 +24,7 @@ import ( // newExportCmd creates and export command func newExportCmd(c *Command) *cobra.Command { cmd := &cobra.Command{ - Use: "export", + Use: "export [flags] [inputs]", Short: "output data in a standard format", Long: ` The export command evaluates a configuration and emits the value of one or more diff --git a/cmd/cue/cmd/fix.go b/cmd/cue/cmd/fix.go index 8e52c33e4..2cc29bc21 100644 --- a/cmd/cue/cmd/fix.go +++ b/cmd/cue/cmd/fix.go @@ -32,7 +32,7 @@ import ( func newFixCmd(c *Command) *cobra.Command { cmd := &cobra.Command{ - Use: "fix [packages]", + Use: "fix [flags] [packages]", Short: "rewrite packages to latest standards", Long: `Fix finds CUE programs that use old syntax and old APIs and rewrites them to use newer ones. After you update to a new CUE release, fix helps make the necessary changes diff --git a/cmd/cue/cmd/fmt.go b/cmd/cue/cmd/fmt.go index 939182bde..3130fcd3e 100644 --- a/cmd/cue/cmd/fmt.go +++ b/cmd/cue/cmd/fmt.go @@ -39,7 +39,7 @@ import ( func newFmtCmd(c *Command) *cobra.Command { cmd := &cobra.Command{ - Use: "fmt", + Use: "fmt [flags] [inputs]", Short: "formats CUE configuration files", Long: ` fmt rewrites CUE files in the standard format. diff --git a/cmd/cue/cmd/get.go b/cmd/cue/cmd/get.go index 1ec1c68f4..81cab9837 100644 --- a/cmd/cue/cmd/get.go +++ b/cmd/cue/cmd/get.go @@ -20,7 +20,7 @@ import ( func newGetCmd(c *Command) *cobra.Command { cmd := commandGroup(&cobra.Command{ - Use: "get [packages]", + Use: "get [flags] [packages]", Short: "add non-CUE dependencies to the current module", Long: `Get downloads packages or modules for non-CUE languages to include them in the module's pkg directory. diff --git a/cmd/cue/cmd/get_go.go b/cmd/cue/cmd/get_go.go index 171776414..f58fbcd04 100644 --- a/cmd/cue/cmd/get_go.go +++ b/cmd/cue/cmd/get_go.go @@ -59,7 +59,7 @@ import ( func newGoCmd(c *Command) *cobra.Command { cmd := &cobra.Command{ - Use: "go [packages]", + Use: "go [flags] [packages]", Short: "add Go dependencies to the current module", Long: `go converts Go types into CUE definitions diff --git a/cmd/cue/cmd/import.go b/cmd/cue/cmd/import.go index eb80ef2e7..dd784476c 100644 --- a/cmd/cue/cmd/import.go +++ b/cmd/cue/cmd/import.go @@ -42,7 +42,7 @@ import ( func newImportCmd(c *Command) *cobra.Command { cmd := &cobra.Command{ - Use: "import [mode] [inputs]", + Use: "import [flags] [mode] [inputs]", Short: "convert other formats to CUE files", Long: `import converts other formats, like JSON and YAML to CUE files diff --git a/cmd/cue/cmd/testdata/script/help_cmd.txtar b/cmd/cue/cmd/testdata/script/help_cmd.txtar index 146584d9e..7fe45f529 100644 --- a/cmd/cue/cmd/testdata/script/help_cmd.txtar +++ b/cmd/cue/cmd/testdata/script/help_cmd.txtar @@ -62,7 +62,7 @@ Run "cue help commands" for more details on authoring tasks and workflow commands. Usage: - cue cmd [inputs] [flags] + cue cmd [flags] [inputs] cue cmd [command] Available Commands: diff --git a/cmd/cue/cmd/testdata/script/help_cmd_flags.txtar b/cmd/cue/cmd/testdata/script/help_cmd_flags.txtar index 3dc324d99..37a1fc445 100644 --- a/cmd/cue/cmd/testdata/script/help_cmd_flags.txtar +++ b/cmd/cue/cmd/testdata/script/help_cmd_flags.txtar @@ -38,7 +38,7 @@ Run "cue help commands" for more details on authoring tasks and workflow commands. Usage: - cue cmd [inputs] [flags] + cue cmd [flags] [inputs] cue cmd [command] Available Commands: diff --git a/cmd/cue/cmd/trim.go b/cmd/cue/cmd/trim.go index 6cdc5f22a..296dddbf2 100644 --- a/cmd/cue/cmd/trim.go +++ b/cmd/cue/cmd/trim.go @@ -34,7 +34,7 @@ import ( // newTrimCmd creates a trim command func newTrimCmd(c *Command) *cobra.Command { cmd := &cobra.Command{ - Use: "trim", + Use: "trim [flags] [inputs]", Short: "remove superfluous fields", Long: `trim removes fields from structs that can be inferred from constraints diff --git a/cmd/cue/cmd/vet.go b/cmd/cue/cmd/vet.go index ed1c2906d..b0aae204a 100644 --- a/cmd/cue/cmd/vet.go +++ b/cmd/cue/cmd/vet.go @@ -25,6 +25,9 @@ import ( const vetDoc = `The vet command validates CUE and other data files. The command is silent when it succeeds; otherwise it reports any errors found. +Input arguments can be CUE packages, CUE files, non-CUE files, or some +combinations of those. See "cue help inputs" for more detail. + By default, vet ensures that the result of validation is concrete by reporting an error if any resulting regular fields have non-concrete values. Use -c=false to not require concreteness, or -c to show these error messages. @@ -59,7 +62,7 @@ The -d flag can be repeated to validate against multiple schemas at once. func newVetCmd(c *Command) *cobra.Command { cmd := &cobra.Command{ - Use: "vet", + Use: "vet [flags] [inputs]", Short: "validate data", Long: vetDoc, RunE: mkRunE(c, doVet),