Skip to content

Commit c353e2f

Browse files
feat: document group field dot notation in field add help (#152)
* feat: document group field dot notation in field add help Add sections support to command routers and use it to document dot notation for adding fields inside groups (e.g. my_group.description). Resolves #139 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: pass sections through to buildRouterHelp Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent bdbe6a3 commit c353e2f

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/commands/field-add.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ import fieldAddUid from "./field-add-uid";
2020
export default createCommandRouter({
2121
name: "prismic field add",
2222
description: "Add a field to a slice or custom type.",
23+
sections: {
24+
"GROUP FIELDS": `
25+
To add a field inside a group, use dot notation for the field ID:
26+
27+
prismic field add text my_group.description --to-type blog_post
28+
29+
The group must already exist. Only one level of nesting is supported.
30+
`,
31+
},
2332
commands: {
2433
boolean: {
2534
handler: fieldAddBoolean,

0 commit comments

Comments
 (0)