Skip to content

Conversation

@ndeloof
Copy link
Contributor

@ndeloof ndeloof commented May 13, 2022

(see docker/cli#3429)

What I did
Added command line completion support

Related issue
closes #8550

(not mandatory) A picture of a cute animal, if possible in relation with what you did
image

@ndeloof ndeloof requested review from glours and ulyssessouza May 13, 2022 10:12
@ndeloof ndeloof force-pushed the cobra_completion_v2 branch 3 times, most recently from 721360b to f5201c3 Compare May 13, 2022 10:51
(see docker/cli#3429)

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>

replace (
github.com/docker/cli => github.com/docker/cli v20.10.3-0.20220309205733-2b52f62e9627+incompatible
github.com/docker/cli => github.com/ndeloof/cli v0.0.0-20220317134108-66942b8c2379
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmmm... This if I understood well is related to manager.Metadata#Completion. The thing is that this is not merged in docker/cli yet...

I'm also not sure if the SchemaVersion should change too.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also... If we are already changing the struct, that would be great if we could add a Meta: map[string]string to open for other applications.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this one is actually obsolete, in docker/cli we gave up with a new schema, and just run the __complete command on plugins. If they don't implement this command, it will just fail and offer no completion.
Also, the idea of SchemaVersion is to avoid an open map[string]string that would make it unpredictable about the possible values being set by plugin.

@ulyssessouza
Copy link
Contributor

@ndeloof Since the docker/cli PR was merged, is this PR ready to be changed in the replace directive in go.mod ?

@Arkemlar
Copy link

Am I correct that only required thing remained is this one MR for completion to be working?

ulyssessouza added a commit to ulyssessouza/compose that referenced this pull request Sep 15, 2022
Co-authored-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
@ulyssessouza
Copy link
Contributor

Closing this PR in favor of #9269 that includes the changes of this one

ulyssessouza added a commit to ulyssessouza/compose that referenced this pull request Sep 15, 2022
Co-authored-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
ulyssessouza added a commit to ulyssessouza/compose that referenced this pull request Sep 19, 2022
Co-authored-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
ulyssessouza added a commit to ulyssessouza/compose that referenced this pull request Sep 23, 2022
Co-authored-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
milas pushed a commit that referenced this pull request Sep 26, 2022
Integrates PR #9462 with additional fixes/changes.

Additional changes will be required to utilize this.

Co-authored-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
@ndeloof ndeloof deleted the cobra_completion_v2 branch December 20, 2023 13:40
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.

Command-line completion?

3 participants