Skip to content
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

Make profile list interactive, to save typing #800

Open
jabberwock opened this issue Mar 5, 2024 · 2 comments
Open

Make profile list interactive, to save typing #800

jabberwock opened this issue Mar 5, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@jabberwock
Copy link

jabberwock commented Mar 5, 2024

Is your feature request related to a problem? Please describe.
I would like to be able to pull up aws-sso list but be able to, with a keyboard/mouse/tap/etc., select the profile to use.

Describe the solution you'd like
I made this PoC for bash/zsh, and it requires the fzf program to be installed:

function aws-sso-select() {
    local aws_profile=$(aws-sso list | tail -n +5 | fzf --bind 'enter:execute(echo {7})+abort')
    eval $(/usr/local/bin/aws-sso eval -p $aws_profile)
}

Describe alternatives you've considered
The alternative is shown in the PoC above. It works but I'd like to see it natively supported.

Additional context
This simply saves me some time having to type aws-sso list, then aws-sso-profile, and pasting the profile. That's all. :)

@jabberwock jabberwock added the enhancement New feature or request label Mar 5, 2024
@jabberwock jabberwock changed the title Make configuration list interactive Make profile list interactive, to save typing Mar 5, 2024
@synfinatic
Copy link
Owner

It's a nice feature... just not sure about the fzf dependency.

@jabberwock
Copy link
Author

No no. I was thinking of implementing it in Go. That fzf proof-of-concept is just that. I noticed you already have some keyboard/mouse interaction during the initial setup for selecting things and I figured it wouldn't be "too" hard to implement, but that could be my ignorance. I'll have a look at the codebase tomorrow and see if it's something I can do. Thanks!

-jw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants