cli v2.6.0: Editing items with `op item get | jq | op item edit` does not create new fields
I'm reading the output of op item get (v2.6.0) and adding a brand new field to an existing section using jq. It looks like this:
op item get "top-secret" |
jq '.fields + [{
id: "my-new-field",
type: "STRING",
purpose: "",
label: "my-new-field",
value: "very secret",
}]' |
op item edit "top-secret"
This runs fine, a new version is generated but my-new-field is not present in the 1password item. Changing values that are already present in the item works fine, just adding new ones silently fails. Anyone knows if this is the expected behavior?
I've verified the resulting json by creating with it a new item, but would like to avoid deleting an existing one to keep versions linked. I've also made a gnarly jq filter to turn JSON into shell arguments for op item edit, but it honestly feels like a horrible hack I'd rather not maintain.
Would appreciate any guidance!
1Password Version: 8.8.0
Extension Version: Not Provided
OS Version: macOS 12.4
Browser:_ Not Provided
