Y
Y
youngmysteriouslight2020-04-14 14:39:12
bash
youngmysteriouslight, 2020-04-14 14:39:12

Why is `complete docker` not defined, but bash docker completion works?

As far as I know, bash defines completion rules based on the bash completion extension, whose basic rules are stored in /etc/bash_completion.d. I have there:
apport_completion darcs docker-compose grub apt-linux-mint dkms git-prompt
As you can see, docker-compose is among them. We check:

$ complete -p docker-compose
complete -F _docker_compose docker-compose

However,
$ complete -p docker
bash: complete: docker: нет определения завершения

In this case, autocomplete works.

I wanted to make an alias to
docker run -it --rm -v "$PWD":/wd -w /wd -u $(id -u):$(id -g)
with saving autocompletion, but faced such a problem.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
chupasaurus, 2020-04-14
@youngmysteriouslight

The autocompletion list from the docker-ce-cli package is put into/usr/share/bash-completion/completions/docker

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question