Skip to content

rbw edit: support editing a single field (--field) #365

Description

@NanShanFish

rbw edit: support editing a single field (--field)

Feature request

rbw edit currently only edits an entry's password + notes (the first line of
the editor buffer is the password, the remainder after a blank line is notes).
There is no way to change the username, entry name, TOTP secret, URI list, or a
custom field from the CLI.

rbw get already supports --field to display a single field; this feature
adds the analogous rbw edit --field to edit one.

Proposal

rbw edit --field <field> <entry> opens the editor with the field's current
plaintext value (uris shown one per line) and saves the edited value back.

Supported fields:

  • username — Login entries
  • name — entry name (any type)
  • notes — any type
  • password — Login entries (records the old password into history)
  • totp — Login entries
  • uris — Login entries, one URI per line (existing per-URI match types are
    preserved for unchanged URIs)
  • any other string — matches a custom field by name substring (same semantics
    as rbw get --field)

Empty input clears the field.

Non-interactive usage works too (piped stdin), consistent with the existing
rbw edit behavior.

Implementation notes

This feature builds on the item-key edit fix (editing keyed entries must
encrypt with the entry's individual key and preserve the key field), so the
feature branch is based on that fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions