Reputation: 7605
I used https://docs.docker.com/machine/completion/ as reference but for whatever reason, on my Mac (macOS 10.15.6), it isn't working.
Warning: bash-completion 1.3_3 is already installed and up-to-date
To reinstall 1.3_3, run `brew reinstall bash-completion`
sudo curl -L https://raw.githubusercontent.com/docker/machine/v0.16.0/contrib/completion/bash/docker-machine.bash -o `brew --prefix`/etc/bash_completion.d/docker-machine
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 12211 100 12211 0 0 84798 0 --:--:-- --:--:-- --:--:-- 84213
I restarted my Mac and Terminal and nothing happened
Upvotes: 1
Views: 1670
Reputation: 3781
Since you are running on macOS 10.15.6, the default shell is now zsh.
So try the zsh completion steps instead.
mkdir -p ~/.zsh/completion
curl -L https://raw.githubusercontent.com/docker/machine/v0.16.0/contrib/completion/zsh/_docker-machine > ~/.zsh/completion/_docker-machine
echo "fpath=(~/.zsh/completion $fpath)" >> ~/.zshrc
echo "autoload -Uz compinit && compinit -i" >> ~/.zshrc
source ~/.zshrc
Upvotes: 2