Ohmyzsh: "docker exec" doesn't do container name autocompletion if used with options

Created on 24 Oct 2016  ·  3Comments  ·  Source: ohmyzsh/ohmyzsh

To reproduce:

# docker exec -ti <tab>
zsh: do you wish to see all 3886 possibilities (972 lines)?

Expected result:
List of started containers.

Note: Everything is OK when there are no options used in the command line. e.g.:

$ docker exec <tab>
determined_heyrovsky  7b4ec7cf2109  --      10 minutes, mystartedcontainer

Most helpful comment

One workaround for this is to simply add a space between the options. So instead of
docker exec -ti <tab>

You can use
docker exec -t -i <tab>

All 3 comments

We're using docker's official completion, and it is a bit outdated now, last commit (f39dcfd) was a month ago.

That said, after a quick glance I haven't seen any changes to the exec part of the completion, so even after I update it it's possible that you have to ask over to the official repo.

Thanks @mcornella . As you suspected, after replacing my local setup with their master the problem was still there.

Opened an issue: https://github.com/docker/docker/issues/27744

Thanks.

One workaround for this is to simply add a space between the options. So instead of
docker exec -ti <tab>

You can use
docker exec -t -i <tab>

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dogrizz picture dogrizz  ·  3Comments

mihnor picture mihnor  ·  3Comments

thienedits picture thienedits  ·  3Comments

nimmoadam picture nimmoadam  ·  3Comments

dariye picture dariye  ·  3Comments