-
Notifications
You must be signed in to change notification settings - Fork 224
Provide autocompletion in bash and zsh #117
Conversation
I'm quite a newbie in Golang, pls gimme some feedback :) |
I love this! Had been meaning to add this myself, but never got around to it. Will review today. |
completion of aws-okta commands. | ||
|
||
Bash | ||
$ source <(aws-okta completion bash) |
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.
I wonder if instead of subcommands, we could do a parameter defaulting to auto
(the current shell).
bash -c 'aws-okta completion'
--> bashbash -c
aws-okta completion bash'` --> bashzsh -c 'aws-okta completion'
--> zsh
Seems a little bit nicer, but not at all a blocker.
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.
I don't know how you can check this, any suggestion?
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.
I was thinking of just parsing $SHELL
. I think that's pretty standard.
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.
$SHELL doesn't work if you change between shells, only for login shell. Maybe we can iterate it in another pr
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.
If you want to figure out the auto
thing, go ahead. Otherwise, feel free to merge!
@nickatsegment I don't have write access so I cannot merge :) Feel free to do it if you feel so. Thanks for maintaining this project |
Closes #116