BUG: edit command is destructive
sedlund opened this issue · comments
Scott Edlund commented
when using edit it will remove all custom fields even if nothing is changed
rbw 1.8.3
$ rbw sync
$ rbw get --full snort.social
blah
Username: blah
URI: https://snort.social/new
private: mysecretkey
$ rbw edit snort.social
# opens nvim, I change nothing and :q
$ rbw get --full snort.social
blah
Username: blah
URI: https://snort.social/new
Mikael Vaaltola commented
I'm able to replicate this as well. The custom field is not included in the edit file which is probably why it disappears after editing. It seems rbw sends an update to the server even if changing nothing in the edit file and quitting with :q
(password history increases). I would expect rbw to only send an update to the server if the edit file is saved and there are actual changes to the file.
Mikolaj Kucharski commented
I just hit the same issue. Did not expect update will go to the server, when I did not change the file with rbw edit
command.
Jesse Luehrs commented
fixed in 1.10.0, thanks!