-
Notifications
You must be signed in to change notification settings - Fork 622
docs: surface that --fields is accepted as an alias for --select on most commands #814
Copy link
Copy link
Closed
Labels
P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.Issue quality rating does not apply to this item.no-staleExempts this issue from stale automation.Exempts this issue from stale automation.
Description
Metadata
Metadata
Assignees
Labels
P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.Issue quality rating does not apply to this item.no-staleExempts this issue from stale automation.Exempts this issue from stale automation.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
The global
--fieldsis accepted as an alias for--select(JSON output projection) on everycommand that doesn't define its own API field-mask
--fields. This is intentional and helpful(agents often guess
--fieldsfor output projection), but it is only surfaced on the--selectflag help, so someone reaching for
--fieldsdirectly won't discover it. A one-line note in theagent / global-flags docs would close the discoverability gap.
Details (v0.22.0, 197992a)
internal/cmd/root.go:251-274(see the explanatory comment at:251-255);commands with a real field-mask
--fieldsare exempted viacommandHasLocalFieldsFlagBefore(
root.go:308).--selecthelp text (root.go:44: "Desire path: use --fieldsfor most commands").
Suggested change (docs only, behavior is correct)
Add a line to the agent-patterns / global-flags documentation, e.g.: "
--fieldsis accepted as analias for
--select(output field projection) on commands that don't take an API field mask."Environment
gog v0.22.0 (confirmed by reading source at
197992a). Working as designed; this is adiscoverability/docs request, not a bug.