Command reference
oko defects kept
Show the fields a defect keeps that this Oko does not know, or drop one a later Oko retired, so a retired field does not ride along in the register forever.
Invocation#
oko defects kept <id> [--drop FIELD --reason TEXT] [--json]Inputs and options#
- A defect id or unambiguous prefix. `--drop` names one kept field and requires `--reason`, why it leaves the register.
Output and state effect#
- Without `--drop`, prints `<id> keeps <field>: <value>` for each kept field, or `<id> keeps no field this Oko does not know`. With `--drop`, removes the field and notes `kept field <field> dropped: <reason>; it held <value>` on the defect. `--json` prints a one-element array holding the defect as it stands after, its kept fields among its own.
Refusals and safe exits#
- `defect <id> keeps no field <field> this Oko does not know; oko defects kept <id> lists the ones it keeps`
- A blank reason, an argument other than --drop, --reason and --json, an unknown defect or an unreadable register refuses without changing anything.
- The real test is `tests/defects/fields/journey.rs` (`defects-fields`): it finds the kept field named by show, drops it, reads the reason in the notes and the second drop refused.