retrofit0.10.0-wip.8

retrofit op show

Render ops from the oplog

Usage:
  retrofit op show [<selector>] [flags]

Flags:
      --annotate               annotate every param with kind/enum metadata
      --filter key=value       scalar equality predicate key=value; repeat for AND
      --findings               after each op, print body-bearing Findings
      --framing string         grammar shape in text mode: log | add | revise (default log: on-disk record) (default "log")
      --head int               keep the first N ops after filtering (N > 0)
  -h, --help                   help for show
      --help-all               show extended help (vocabulary, semantics, caveats)
      --include-sealed         widen scope to include sealed ops
  -k, --keys strings           project only these editable keys (comma-separated; repeatable)
      --long                   one param per line with shell line-continuation
      --raw                    print one fixed-shape key=value record per AddColumn op (op, name, typ, typeRef); ignores --keys/--framing/--filter/--touching/--tail/--head
      --tail int               keep the last N ops after filtering (N > 0)
      --touching stringArray   match ops referencing this element; repeat for OR

Global Flags:
      --as string        output mode: text | json (default "text")
  -C, --chdir string     treat <dir> as the working directory for the entire run
      --config string    retrofit.toml path (overrides discovery; also accepts $RETROFIT_CONFIG)
  -f, --file string      oplog file path; selects a registered [[schema]] path (overrides discovery)
      --no-consolidate   render every advisory occurrence instead of collapsing repeats
  -q, --quiet count      suppress the advisory tier on stderr; stack (-qq) to drop it whole (errors and results still print)
      --schema <name>    registered schema <name> (resolves via the chain when omitted)
  -v, --verbose          reveal info-tier advisories on stderr

Docs: https://docs.retrofit.sh/current/commands/retrofit-op-show/

retrofit op show --help-all adds:

Extended help:

Framing (`--framing`):

  log       (default) on-disk record grammar: opid as the first
            field of every line. Parse-faithful to the .oplog file:
            element references stay as 12-hex ids (no name
            resolution). Best for "what's in my oplog right now."

  add       runnable `retrofit op add ...` lines. Element refs
            resolve to dotted names. Useful for cloning ops into a
            new authoring session; `op show --framing=add | sh`
            replays the slice. A trailing `# <short-opid>` shell
            comment surfaces the opid (`op add` mints its own).

  revise    runnable `retrofit op revise <short-opid> ...` lines.
            The operator name is omitted (revise cannot change it).
            Best for sed-style pipe-editing of bound params.

`--as=json` overrides framing entirely and emits NDJSON records.

Windowing:

  --tail N     keep the last N matching ops (oldest-first order kept;
               N is a count, not a direction). N must be > 0.
  --head N     keep the first N matching ops.

  Mutually exclusive with each other and with a <selector> argument
  (selectors are precise ranges; windowing flags are heuristic).

  Scope: `--tail N` and `--head N` implicitly include sealed ops.
  If the count fits entirely within the unsealed tail, no sealed op is
  shown; if N crosses the Seal boundary, the window extends into sealed
  territory. `--include-sealed` is the
  explicit form of the same widening for the no-window case.

Pipeline order:
  scope → --filter / --touching → --head / --tail → --keys → framing

  `--filter` and `--touching` apply BEFORE the window; `--tail N`
  returns the last N of the matching ops, not the last N of the slice
  (matches `git log --author=X -n 10` semantics).

Without a windowing flag or `--include-sealed`, sealed ops are
hidden. The default scope is the unsealed tail (everything after the
most recent Seal).

Before 1.0, any release may change behavior; the release notes list what changed.