Open nitrocode opened 3 years ago
I did notice there is a new completion
subcommand.
⨠eval $(atmos completion bash)
⨠atmos<tab>
completion (generate the autocompletion script for the specified shell)
describe (describe)
helmfile (helmfile command)
help (Help about any command)
terraform (terraform command)
version (version command)
This seems to be off
⨠atmos terraform <tab>
--stack -s generate (generate)
That should show plan/apply/deploy/destroy
This returns a -
when hitting tab instead of showing the list of components
⨠atmos terraform plan <tab>
This returns another -
when it should show the list of stacks
⨠atmos terraform plan efs --stack <tab>
@mcalhoun
I reopened this ticket because I was hoping we could do something like this
# get components
atmos terraform plan <tab>
# get root stack
atmos terraform plan ecr --stack <tab>
Yeah, I just realized I only implemented the base-level (atmos commands) and not stack completion. Figuring out how to do that will be a bit more tricky.
"real" (not abstract) component completion and root stack completion would be very handy here.
I also noticed that subcommands are missing.
✗ atmos terraform<tab>
generate -- Execute 'terraform generate' commands
provision -- This command provisions terraform components
I was expecting plan
, deploy
, apply
, etc
Here's a way to get all the stacks using yq
✗ atmos describe stacks | yq e '. | keys'
- gbl-corp
- gbl-identity
- gbl-root
...
An even easier way is using it natively in atmos
✗ atmos list stacks
gbl-corp
gbl-identity
gbl-root
Here's how to get all the real components using yq
✗ atmos describe stacks | yq e '. | to_entries | .[].value.components.terraform | with_entries(select(.value.metadata.type != "abstract")) | keys' | grep -v '\[\]' | sort | uniq
- aws-team-roles
- aws-teams
- account
- account-map
- aws-team-roles
- github-oidc-provider
- vpc
Have a question? Please checkout our Slack Community or visit our Slack Archive.
Describe the Feature
Tab completion for atmos commands
Expected Behavior
Use Case
I want the command and stacks to complete using tab instead of having to type it in each time
Describe Ideal Solution
It's implemented
Alternatives Considered
None
Additional Context