Closed jcreyf closed 1 year ago
The autocomplete scripts will be extra maintenance going forward, so I'd like to get feedback from the community on whether this feature will be useful for large numbers of users or not.
Thanks @epierce !
The maintenance overhead is minimal though. It's basically only when an argument changes in gimme-aws-creds
.
I think most of the value of this autocomplete sits in no longer needing to memorize the profiles you created in ~/.okta_aws_login_config
. Some of us have quite a few profiles. Especially when you have quite a few AWS Accounts to manage using multiple IAM roles at different access levels. I have a dozen or so profiles at this point and it will most probably grow even more.
Autocomplete dynamically pulls the profile names out of the config-file and shows them to you as you are generating the command.
Just merged #379
This is a feature request to get auto-completion added to
gimme-aws-creds
.Expected Behavior
Pressing the tab-key twice after the
gimme-aws-creds
command shows a list of supported arguments:The list of possible arguments is shorter as the user enters more characters:
Auto-completion will automatically type the remained of the selected argument if only 1 single choice is left:
gimme-aws-creds will automatically complete the CLI to:
If an argument supports specific values, then have auto-complete show those values:
the same auto-complete should happen here when the user types
e
orj
and then hits tab.The auto-completion can also show the available profiles from the
~/.okta_aws_login_config
file when the--profile
argument is selected:with same auto-completion of the selected profile name as the user enters more characters.
Current Behavior
There's no auto-complete available in the current version.
Possible Solution
I have this exact described behavior implemented in my fork: https://github.com/jcreyf/gimme-aws-creds/blob/autocomplete/bin/gimme-aws-creds-autocomplete.sh
Steps to Reproduce (for bugs)
This is not a bug. Just a nice to have to reduce typing anxiety and lack of memory to memorize the supported arguments.
Context
This is reducing the chance of typos and you don't have to open another shell to run
gimme-aws-creds --help
to get a list of supported arguments while trying to compose the command line.Your Environment