hwchen / keyring-rs

Cross-platform library and utility to manage passwords
Apache License 2.0
450 stars 49 forks source link

Add a way to only get the secret #130

Closed jankatins closed 1 year ago

jankatins commented 1 year ago

I want to use the example cli to interct with the keyrings on linux and mac and for that it would be nice to have a way to only return the password and not the The password for 'jan@jasc-one' is 'whatever'. Any chance to add such a cli interface? E.g. keyring-cli --service jasc-one get --password-only?

brotskydotcom commented 1 year ago

If you want to submit a pull request with this change, I'm happy to review it.

jankatins commented 1 year ago

See #131

brotskydotcom commented 1 year ago

Thanks for the PR! As I reviewed it, I realized that you also made another change (to return different exit statuses) that make the cli more suitable for scripted use. So I decided to go further than you had and have opened PR #134. Take a look and see if that does what you need.