Skip to content

Commit

Permalink
cmd/cue: provide initial text for 'help embed'
Browse files Browse the repository at this point in the history
Provide skeleton text for 'cue help embed'. This gives a one-liner that
will mirror the headline sentence from the proposal linked from
https://cuelang.org/discussion/3264.

For #3268.

Signed-off-by: Paul Jolly <[email protected]>
Change-Id: Ib511ae846c40e4eee0847190d2764ecc7401d8c8
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1197335
Reviewed-by: Roger Peppe <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
TryBot-Result: CUEcueckoo <[email protected]>
  • Loading branch information
myitcv committed Jul 8, 2024
1 parent e460eb0 commit 5c8be53
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions cmd/cue/cmd/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ func newHelpCmd(c *Command) *cobra.Command {

var helpTopics = []*cobra.Command{
commandsHelp,
embedHelp,
environmentHelp,
filetypeHelp,
flagsHelp,
Expand Down Expand Up @@ -171,6 +172,21 @@ $ cue export data.json schema: schema.json
`,
}

var embedHelp = &cobra.Command{
Use: "embed",
Short: "file embedding",
Long: `
The @embed directive can be used to load files of any type as part of CUE
evaluation.
Note: support for embed is experimental, and is enabled via
CUE_EXPERIMENT=embed.
For more details and discussion, see the proposal linked from
https://cuelang.org/dicsussion/3264.
`[1:],
}

var environmentHelp = &cobra.Command{
Use: "environment",
Short: "environment variables",
Expand Down
1 change: 1 addition & 0 deletions cmd/cue/cmd/testdata/script/help.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ Flags:

Additional help topics:
cue commands user-defined commands
cue embed file embedding
cue environment environment variables
cue filetypes supported file types and qualifiers
cue flags common flags for composing packages
Expand Down

0 comments on commit 5c8be53

Please sign in to comment.