-
Notifications
You must be signed in to change notification settings - Fork 599
feat(docs): top-level table-row / table-column / table-merge commands #686
Copy link
Copy link
Open
Labels
P2Normal priority bug or improvement with limited blast radius.Normal priority bug or improvement with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper 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.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.Issue quality rating does not apply to this item.
Metadata
Metadata
Assignees
Labels
P2Normal priority bug or improvement with limited blast radius.Normal priority bug or improvement with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper 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.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.Issue quality rating does not apply to this item.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Motivation
gog already implements row/column add/delete and cell merge via the
gog docs sedbrace DSL (|2|[+1,0]/foo/,|2|[1,1:1,3]/merge/, etc.). These are powerful but the syntax overhead is high for one-shot calls in scripts. A user who knows "I want to add a row at the end of the second table" should not have to learn the regex address syntax.The implementation already exists in
internal/cmd/docs_sed_table_ops.go(InsertTableRow / DeleteTableRow / InsertTableColumn / DeleteTableColumn / MergeTableCells / UnmergeTableCells emitted from the sed path). Lifting them into top-level commands is mostly a CLI surface change.Repro
Proposed surface
--table=<header-text>mode: resolves to the table whose first-row-first-cell text matches verbatim (Docs API has no native "table label" — this is the most stable proxy in practice).All commands map to single batchUpdate requests; the brace-DSL implementation can be lifted into a shared helper.
Acceptance criteria
--table=<header-text>resolves the table by verbatim first-cell text; ambiguity errors out.--table=Nmatches the sed convention (1-based, negative from end,*for all).References
internal/cmd/docs_sed_table_ops.go