Skip to content

feat(docs): promote sed-brace structural ops to first-class commands (insert-footnote / insert-section-break / insert-hr / section columns) #856

Description

@sebsnyk

Several structural primitives are implemented but only reachable through the sed brace mini-language on the replacement side of a regex (e.g. {+=p} page break, {+=c} column break, {+=s} section break, the default-break horizontal rule, footnote insertion, and column count via section style). That path is undocumented in --help, requires a regex anchor, and is awkward to address by index or literal-text anchor the way the other inserters are.

These already have working request builders in the codebase (InsertSectionBreakRequest, CreateFootnoteRequest, UpdateSectionStyleRequest, and the bottom-border HR via InsertText + border). Promoting them to first-class commands with the standard --index / --at <text> / --at-end / --tab selectors (the same surface insert-page-break already has) would make them discoverable and consistent:

gog docs insert-footnote <docId> --at <text> --text <footnote body>
gog docs insert-section-break <docId> --at <text> [--type NEXT_PAGE|CONTINUOUS]
gog docs insert-hr <docId> --at <text>
gog docs section-columns <docId> --count N [--at <text>]   # UpdateSectionStyle column count

insert-page-break is the proven template — these would mirror its selector handling. This removes the regex-only requirement for structural editing and surfaces capability that already exists but is effectively hidden.

Ref: documents.batchUpdate InsertSectionBreakRequest, CreateFootnoteRequest, UpdateSectionStyleRequest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions