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

Added basic subcommand completion #64

Merged
merged 1 commit into from
Sep 1, 2021

Conversation

emattiza
Copy link
Contributor

Address #57. Just added the sample shell completion logic, straight copy-paste from cobra/shell_completions.md. Will need to discuss customizing for required flags on all or some subcommands? Whats the mix of env-vars and flags required per command, or omit and discover via help?

Here's some sample pics at root:
image
Under server:
image
Under span:
image
Under completion (listing valid completion targets):
image

Just added the sample shell completion logic, straight copy-paste. Will need to discuss customizing for required flags on all subcommands?
Copy link
Collaborator

@tobert tobert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome, thanks!

# To load completions for every new session, run:
PS> otel-cli completion powershell > otel-cli.ps1
# and source this file from your PowerShell profile.
`,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typically I would put this huge string at the bottom of the struct but it's fine.

I love how thorough the instructions are!

@tobert
Copy link
Collaborator

tobert commented Sep 1, 2021

"Will need to discuss customizing for required flags on all subcommands?"

@emattiza if I understand you, yeah that's a good idea. I'll merge this and write up an issue for that.

@tobert tobert merged commit 7d2709f into equinix-labs:main Sep 1, 2021
@tobert tobert mentioned this pull request Sep 1, 2021
3 tasks
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