Skip to content

Commit 5de5b42

Browse files
jpluscplusmmvdan
authored andcommitted
cmd/cue: point "help get" text at CUE-specific cmd
This updates the "cue help get" text to make it clear that "cue get" doesn't interact with CUE dependencies. For CUE modules, it updates two help texts by pointing the reader onwards to "cue help modules", and from there to "cue help mod". Also: fix a typo (which was the initial motivation for this edit) Signed-off-by: Jonathan Matthews <[email protected]> Change-Id: I2a980be042fe544c95a71c8b46a20616cb7c4bd6 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1198447 TryBot-Result: CUEcueckoo <[email protected]> Reviewed-by: Daniel Martí <[email protected]>
1 parent 8145bdd commit 5de5b42

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

cmd/cue/cmd/get.go

+9-6
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,19 @@ import (
2323
func newGetCmd(c *Command) *cobra.Command {
2424
cmd := &cobra.Command{
2525
Use: "get <language> [packages]",
26-
Short: "add dependencies to the current module",
27-
Long: `Get downloads packages or modules for CUE or another language
26+
Short: "add non-CUE dependencies to the current module",
27+
Long: `Get downloads packages or modules for non-CUE languages
2828
to include them in the module's pkg directory.
2929
3030
Get requires an additional language field to determine for which
31-
language definitions should be fetched. If get fetches definitions
32-
for a language other than CUE, the definitions are extracted from
33-
the source of the respective language and stored.
34-
The specifics on how dependencies are fechted and converted vary
31+
language definitions should be fetched. Definitions are extracted
32+
from the source of the respective language and stored.
33+
The specifics on how dependencies are fetched and converted vary
3534
per language and are documented in the respective subcommands.
35+
36+
For information on native CUE modules:
37+
38+
cue help modules
3639
`,
3740
RunE: mkRunE(c, func(cmd *Command, args []string) error {
3841
stderr := cmd.Stderr()

cmd/cue/cmd/help.go

+4
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,10 @@ For a detailed reference on modules:
286286
287287
https://cuelang.org/docs/reference/modules/
288288
289+
For information on commands that interact with modules:
290+
291+
cue help mod
292+
289293
For tutorials on how to use the Central Registry, see:
290294
291295
https://cuelang.org/docs/tutorial/working-with-the-central-registry/

cmd/cue/cmd/testdata/script/help.txtar

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Available Commands:
8686
export output data in a standard format
8787
fix rewrite packages to latest standards
8888
fmt formats CUE configuration files
89-
get add dependencies to the current module
89+
get add non-CUE dependencies to the current module
9090
help show help text for a command or topic
9191
import convert other formats to CUE files
9292
login log into a CUE registry

0 commit comments

Comments
 (0)