-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BEEEP] SM-1005 - Add env output option #320
Conversation
No New Or Fixed Issues Found |
Nice! A couple of small things:
|
Good point. I hadn't considered that... I'll try to work something out for the escape characters.
I actually had a version of this in my own fork of the CLI, where I didn't have any issues, but I think in the scripts that I wrote that relied on it stripped-out the comments. I'd be fine excluding the notes to avoid dealing with any potential parsing issues that could occur.
Very nice! I'll switch to using that! |
@dani-garcia, regarding problematic key names: what do you think of commenting the key-value pair out if it's non-POSIX-compliant? Like this: |
That seems reasonable to me, the comment explaining why they are excluded is a great touch! |
Co-authored-by: Daniel García <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thank you!
Type of change
Objective
Add an env output option to
bws
. This allows for easier command-line usage in scripts, particularly where a JSON or YAML parser is not desirable or available.Basic usage examples in Bash:
source <(bws secret get ec9e0489-244e-4b3f-8782-b0a800fe562f -o env)
bws secret list -o env > .env
Code changes
crates/bws/src/render.rs
: Output secrets inkey="value"
formatScreenshots
Before you submit