Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

404
Visualizações
How to get docker 'objects' completion on mintty-bash from git for windows

I have read (and tried) this: https://docs.docker.com/machine/completion/

But it seems this is not the right way to get it on.

Anybody know how to get docker completion commands in Mintty (from Git for windows) bash command line?

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Not sure if this is the best way to do this or if it work properly at all, but it seems to work! Let me know if you find any strange behavior...

Minimum requirements:

  • Git for Windows (git bash / mintty terminal)
  • 7-Zip or similar to extract files

Installation:

First of all, you will need the bash-completion package.

I discovered that the package built for cygwin works.

  1. Choose a cygwin mirror: https://cygwin.com/mirrors.html
  2. Navigate to: /cygwin/noarch/release/bash-completion/
  3. Download: bash-completion-2.7-1.tar.xz
  4. Extract it elsewhere
  5. Copy the etc and usr folder to C:\Program Files\Git (see the note below)

Done, now you should have command completion enabled.


Testing:

You can test it by opening a git bash terminal and typing:

curl --ver (hit tab twice)

It will suggests something like this:

$ curl --ver
--verbose  --version

Docker commands:

Now, about that docker commands...

I have found my files here:

docker command: https://github.com/docker/docker-ce/blob/v17.09.0-ce/components/cli/contrib/completion/bash/docker

docker-compose command: https://github.com/docker/compose/blob/1.16.1/contrib/completion/bash/docker-compose

docker-machine command: https://github.com/docker/machine/blob/v0.12.2/contrib/completion/bash/docker-machine.bash

Just download and copy them to: C:\Program Files\Git\usr\share\bash-completion\completions\

Make sure they are correctly named (remove the filename extension if any).

It should be named like this:

  • docker
  • docker-compose
  • docker-machine

No extra .txt or whatever...

docker commands with completion


Some notes:

I'm not sure if the package bash-completion-2.7.1 is the best version to work with git bash, I just got the latest one. (You can compare them and find it out)

You don't need to copy all the files from /usr/share/bash-completion/completions/, just the ones you want. (I didn't copy any of them).

It's a good idea to run a docker version, docker-compose version, docker-machine version and check the versions you are running, then download the correct files from the repository. (Choose the correct release tag for you).

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda