Skip to content

Add editing for existing custom fields - #372

Draft
m11y wants to merge 2 commits into
doy:mainfrom
m11y:feat/edit-custom-field-v2
Draft

m11y wants to merge 2 commits into
doy:mainfrom
m11y:feat/edit-custom-field-v2

Conversation

@m11y

@m11y m11y commented Sep 3, 2026 •

Copy link
Copy Markdown

Summary

  • Add rbw edit --field=<name> for updating one existing custom field on login, secure note, card, and identity entries from piped stdin or an interactive editor.
  • Reject empty values, SSH key entries, linked fields, and invalid boolean values; on a revision conflict, rebase only when the target field's plaintext did not change.
  • Add rbw get --list-custom-fields, Fish completion, documentation, and focused tests for field lookup, help stripping, validation, and conflict comparison.

This branch is stacked on #371. Until that PR merges, GitHub's base comparison also shows its safety changes; the feature-only change is commit d21dc8f and touches five files.

Test plan

  • cargo test --all-features
  • cargo clippy --bin rbw --lib -- -D warnings
  • cargo fmt --check
  • fish -n src/bin/rbw/completion/rbw.fish
  • Pipe a value into rbw edit --field=<existing> <entry> and verify it with rbw get --field=<existing>
  • Verify a failed pipe edit does not create an unsaved-edit file
  • Verify concurrent edits to another field rebase while edits to the same field conflict
  • Verify keyed items remain decryptable and SSH key / linked field edits are rejected

Depends on: #371
CI's lint job is red here for reasons that predate this branch: stable clippy 1.98 fails --all-targets --all-features -- -Dwarnings on main itself, at eight sites in code this PR does not touch. #373 fixes those. That job then fails again at cargo deny check on RustSec advisories in Cargo.lock (bytes, quick-xml, rand, rustls-webpki, yanked spin), which is also independent of this branch and needs a dependency refresh. cargo clippy --bin rbw --lib, cargo fmt --check, and cargo test --all-features are clean on this branch.

Related: #364

@m11y m11y mentioned this pull request Sep 3, 2026
2 of 8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant