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
Command-line completion? #8550
Comments
Should be easy to generate one, as Cobra command library includes support for generating completion scripts https://github.com/spf13/cobra/blob/master/shell_completions.md |
Are we looking to reach parity with docker-compose or is this not a requirement? |
@mat007 we don't have any shell completion support for |
In the mean time, does anyone know if there's a way to configure |
This might suggest a way to do that: |
There was some completion but it was removed in c28aec2 |
AFAICT offering command line completion for |
I was pretty sure this was already in place, but apparently it’s either not fully implemented or not working. |
IIRC @ulyssessouza experimented with this, but he was blocked by docker CLI plugin architecture (we can't extend the docker CLI completion script) |
This is very strange indeed. What happened with the bash auto completion. Otherwise I would have created a PR for upgrading docker-compose to v2.2.2 on https://github.com/docker/docker.github.io/ |
Please note the existing |
This problem has been solved? in some version? |
|
No, this doesn't seem to be solved yet. |
seems docker-compose is integrated as compose subcommand in docker see docker/compose#8550
Ok i think i missed something 🤔 : Is |
|
@SuperSandro2000 thanks. I got the shift from python to go, but I didn't catch that it is integrated as plugin. |
for completeness: under the hood, docker's cli-plugins handling does invoke a |
Yeah, I was worried about that as I've been invoking |
@ndeloof i think this should be possible if you can update the docker cli to a newer cobra version. In docker cli you just add a subcommand for each (installed) plugin with flag parsing disabled like here. The value
value\twithDescription
:4
# empty line So just return |
Started experimenting with cobra 1.3.0 to adopt cobra (dynamic) completion v2 : docker/cli#3429 |
Nice. If it's any help for anyone in the meantime: got my completer at carapace-bin. |
Seems fish completions did not get updated to include compose command https://github.com/docker/cli/tree/master/contrib/completion |
I am also un-happy to lost autocompletion with this new version :( I not really understand why change docker-compose to docker compose if it is more difficult to use the command line. With old approch I use some file like this docker-compose-xxxxx.yml and in each file I have some services (preprod, prod, etc.), so to start/stop service it is very easy to just write
Now i need to write all, all the time (or use the history, ctrl+r, etc.). I understand the reason to not use python version anymore but for user, it is not better/simple to use compose. (Docker Compose version v2.6.0) |
I'm experiencing the same.
|
#9462 was designed to demonstrate ability to provide command line completion from a docker CLI plugin, and get docker/cli#3429 approved. |
Is this supposed to work now? With Docker 20.10.18 and Docker Compose 20.10.2, on ArchLinux, I still get the same Docker 20.10.18 release notes: https://docs.docker.com/engine/release-notes/#201018
|
Looks like it also doesn't work on Debian bullseye.
|
|
doesn't work on Debian 10
|
It's not the same as having completions for
And then by creating your own version of
|
I'm in the same boat. Should you need any info from my setup just ask. Cheers, |
My point is that the command exists, so ... why is it not being included in releases? |
Is there an alternative for Zsh? Additional info: > docker -v
Docker version 20.10.22, build 3a2c30b
> docker compose version
Docker Compose version v2.14.1
> cat /etc/issue
Ubuntu 22.04.1 LTS |
I upgrade to version 2.20.2, it still doesn't work, any progress?
|
@allenyllee you might want check this docker/docs#16397 (comment) |
It works for me in ubuntu 22.04 bash
|
Is there a way to use Bash completion with Zsh? I have |
completion is managed by the docker CLI, You can use |
Thanks, was using Zsh completion from contrib. Is it even needed anymore then? |
I'm not sure about the current status for the "new" extensible completion. |
Am I right in seeing the Found docker/docs#16397 which added completions for mac but the zsh instructions don't seem applicable to linux. |
The contents of |
Docs are a little outdated though - they point @ the contrib completion scripts which don't work for |
This worked for me with bash: |
Adding to zsh
source <(docker completion zsh) bash
source <(docker completion bash) |
I just wonder if there's a command completion like there is for the docker-compose command.
The text was updated successfully, but these errors were encountered: