doy / rbw

unofficial bitwarden cli
https://git.tozt.net/rbw
Other
581 stars 83 forks source link

Add support for copying (T)OTP code to clipboard #127

Closed rjc closed 2 months ago

rjc commented 11 months ago

Hello,

get command received support for --clipboard option recently - could the same be done to code command, please?

While we're at it, it has taken me a while to figure out that code means (t)otp. Could the name be changed to one of the latter, with code remaining an alias (at least for the time being). please? I don't recal ever seeing code used in this context in any other application - it is usually either totp or otp.

Regards,

rjc

Lillecarl commented 5 months ago

Just pipe to whatever clipboard mangager you're using

rbw get SECRET | wl-copy -n.

It's out of scope to handle all copy variants (pbcopy, clip.exe, wl-copy, xcopy)

rjc commented 5 months ago

@Lillecarl, get command already has --clipboard option. code, on the other hand, does not, and it would be useful for it to have one, since get already has it, as both commands' output is usually copy-pasted somewhere.

doy commented 2 months ago

fixed in 1.10.0, thanks!