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

Add fish completions #497

Closed
wants to merge 6 commits into from
Closed

Add fish completions #497

wants to merge 6 commits into from

Conversation

drmikecrowe
Copy link
Contributor

I believe these are the completions for fish. I got some via chatgpt, and others using ryotako/fish-completion-generator. Works for me

@synfinatic
Copy link
Owner

synfinatic commented Jul 30, 2023

This PR is already out of date because there is no auto-generation / discovery and I just merged #496 . Frankly I'm not at all willing to manually add items to the list (far too fragile and difficult to validate). Can this be automated in some way?

@synfinatic synfinatic added this to the next release milestone Jul 30, 2023
@drmikecrowe
Copy link
Contributor Author

I'll review. Automated, ugh, I'll investigate

@drmikecrowe
Copy link
Contributor Author

@synfinatic I agree with you tho. I went overboard and added subcommand help as well. I've been experimenting with carapace as a complete. Given it's multi-shell and seems like it can be automated (and provide all shells), is this an option?

@synfinatic
Copy link
Owner

So giving more thought to this:

Have you looked at the existing bash or zsh support code? I ask, because both of those take advantage of the dynamic discovery of auto-complete of flags/options that exist today in aws-sso thanks to posener/complete. That's definitely the preferred way of doing things since it means users don't have to update their shell init script every time there is a new flag/option.

I'd also like to bring your attention to this this feature request: #482 which a static definition of auto-complete will never be able to address.

For those reasons, this type of PR (even if the contents of aws-sso.fish are auto-generated) will be hard for me to accept.

As for the question of carapace, bash and zsh auto-complete support is pretty robust today without introducing additional dependencies / tools that users need to install. Now if you tell me fish auto-complete isn't as advanced as bash/zsh and needs a 3rd party tool to enable that, well I'm open to considering that, but I don't have any interest in requiring bash/zsh users to also install/configure it.

That said, a quick reading of the carapace docs seem to indicate adding support for aws-sso would effectively be a PR against carapace, not aws-sso. I quickly looked a a few of the existing tools it supports today, and I suspect it could take advantage of the existing posener/complete functionality that exist today? Definitely the completer for the aws command is doing some magic.

@synfinatic
Copy link
Owner

One last comment: the release yesterday added some basic fish auto-complete support that wasn't available unless you were building from source. Not sure if you were testing with that before you did your PR? Mind giving that a go and let me know?

@synfinatic
Copy link
Owner

looks like v1.11.0 is going to be coming a lot sooner than I first expected. Gonna take this off the next release train to give this more time. Happy to make a release happen when this is ready.

@synfinatic synfinatic removed this from the v1.11.0 milestone Aug 1, 2023
@synfinatic
Copy link
Owner

@drmikecrowe So I think I found a fix. Mind trying and let me know? #622

@synfinatic synfinatic closed this Oct 17, 2023
@drmikecrowe
Copy link
Contributor Author

@synfinatic -- checking

@drmikecrowe
Copy link
Contributor Author

@synfinatic sorry for the late reply -- finally got it installed and tested. Looks great!

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

Successfully merging this pull request may close these issues.

2 participants