common-fate / granted

The easiest way to access your cloud.
https://granted.dev
MIT License
964 stars 91 forks source link

`-x` alias for `--export-all-env-vars` #520

Closed dlambda closed 9 months ago

dlambda commented 9 months ago

What changed?

-x alias for new --export-all-env-vars used to invoke previous (sometimes unwanted) default behaviour.

Why?

For less typing for my main use of assume

How did you test it?

Potential risks

Is patch release candidate?

Link to relevant docs PRs

https://github.com/common-fate/granted/pull/467#issuecomment-1767993740

chrnorm commented 9 months ago

Thanks for this PR! 🙌 I think we'll also expose and document a config setting to revert the behaviour to the previous default if you prefer, as typing -z every time is just adding extra keystrokes and makes the CLI more cumbersome. I'm happy with -z, I think -x would be ideal but we already have a -ex flag to export credentials to ~/.aws/credentials so this avoids confusion with -ex.

dlambda commented 9 months ago

Great - thanks for this! 🤦 don't know why I messed up the branch & commit message, but did actually mean -x.

chrnorm commented 9 months ago

🤦 oh my mistake! Given this has landed and been released we could consider eventually deprecating and eventually removing the -ex flag to prevent confusion, I don't think it's used that frequently