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

DRAFT: ✨ Show all provider subcommands #2266

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

arlimus
Copy link
Member

@arlimus arlimus commented Oct 17, 2023

Usually we only show subcommands for providers that are installed.
This offers an alternative where we show all provider subcommands in the
help menu.

After #2265

eg:

> cnquery shell --help 
Allows the interactive exploration of MQL queries.

Usage:
  cnquery shell [flags]
  cnquery shell [command]

Available Commands:
  arista           Interactive shell with an Arista EOS device
  atlassian        Interactive shell with Atlassian
  aws              Interactive shell with an AWS account
  azure            Interactive shell with an Azure subscription
  container        Interactive shell with a running container or container image
  docker           Interactive shell with a running docker or docker image
  equinix          Interactive shell with an Equinix Metal organization
  filesystem       Interactive shell with a mounted file system target.
  gcp              Interactive shell with a Google Cloud project
  github           Interactive shell with a GitHub organization or repository
...

I still wonder if we should create a custom help for these provider
plugins that is shorter than the current list of defaults. They are
getting a bit out of hand...

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
Usually we only show subcommands for providers that are installed.
This offers an alternative where we show all provider subcommands in the
help menu.

eg:

```bash
~ $> cnquery shell --help                                                                                                                                  x1
Allows the interactive exploration of MQL queries.

Usage:
  cnquery shell [flags]
  cnquery shell [command]

Available Commands:
  arista           Interactive shell with an Arista EOS device
  atlassian        Interactive shell with Atlassian
  aws              Interactive shell with an AWS account
  azure            Interactive shell with an Azure subscription
  container        Interactive shell with a running container or container image
  docker           Interactive shell with a running docker or docker image
  equinix          Interactive shell with an Equinix Metal organization
  filesystem       Interactive shell with a mounted file system target.
  gcp              Interactive shell with a Google Cloud project
  github           Interactive shell with a GitHub organization or repository
...
```

I still wonder if we should create a custom help for these provider
plugins that is shorter than the current list of defaults. They are
getting a bit out of hand...

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
@chris-rock chris-rock marked this pull request as draft February 28, 2024 10:21
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.

1 participant