You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(sheets): add --inherit-from-before to sheets insert (#658)
* feat(sheets): add --inherit-from-before to sheets insert
`gog sheets insert` always derived InsertDimensionRequest.inheritFromBefore
from --after, so there was no way to insert columns/rows with plain formatting
next to a formatted neighbour (the reported case: plain 0–100 score columns
inserted beside a currency column first rendered as currency).
Add a tri-state `--inherit-from-before` flag (*bool): omitted keeps the prior
default (inherit only with --after), `--inherit-from-before=false` forces plain
formatting, and `--inherit-from-before` forces inheritance on a before-insert.
Regenerate the command reference (make docs-commands) so the flag is documented.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
* fix(sheets): validate insert formatting inheritance
---------
Co-authored-by: Claude Opus 4.8 <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@
6
6
7
7
- Gmail: keep label IDs case-sensitive during label resolution and duplicate-name checks while still matching label names case-insensitively.
8
8
- Gmail: clarify that `gmail drafts delete` permanently deletes drafts and cannot be recovered. (#656, #659) — thanks @chrischall.
9
+
- Sheets: add `--inherit-from-before` to `sheets insert` so callers can choose whether inserted rows/columns inherit formatting from the preceding or following neighbor. (#655, #658) — thanks @chrischall.
9
10
- Docs: update the bundled `gog` agent skill to preserve broad user OAuth scopes during reauth and rely on command guards for scoped execution.
|`-h`<br>`--help`|`kong.helpFlag`|| Show context-sensitive help. |
33
33
|`--home`|`string`|| Override gogcli config/data/state/cache root (equivalent to GOG_HOME) |
34
+
|`--inherit-from-before`|`*bool`|| Inherit number format / styling from the row/column before the insertion. Defaults to true with --after, false otherwise; false inherits from the row/column after the insertion. |
34
35
|`-j`<br>`--json`<br>`--machine`|`bool`| false | Output JSON to stdout (best for scripting) |
35
36
|`--no-input`<br>`--non-interactive`<br>`--noninteractive`|`bool`|| Never prompt; fail instead (useful for CI) |
36
37
|`-p`<br>`--plain`<br>`--tsv`|`bool`| false | Output stable, parseable text to stdout (TSV; no colors) |
Copy file name to clipboardExpand all lines: internal/cmd/sheets_insert.go
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,9 @@ type SheetsInsertCmd struct {
18
18
Startint64`arg:"" name:"start" help:"Position before which to insert (1-based; for cols 1=A, 2=B)"`
19
19
Countint64`name:"count" help:"Number of rows/columns to insert" default:"1"`
20
20
Afterbool`name:"after" help:"Insert after the position instead of before"`
21
+
// *bool so an unset flag keeps the historical default (inherit only when
22
+
// --after); passing --inherit-from-before[=false] overrides it explicitly.
23
+
InheritFromBefore*bool`name:"inherit-from-before" help:"Inherit number format / styling from the row/column before the insertion. Defaults to true with --after, false otherwise; false inherits from the row/column after the insertion."`
0 commit comments