我试图在这个堆栈上完成Docker shell的完成(OSX iTerm2 oh-my-zsh)
我按照本指南 – > https://docs.docker.com/compose/completion/
首先我执行了这个
$mkdir -p ~/.zsh/completion
$curl -L https://raw.githubusercontent.com/docker/compose/master/contrib/completion/zsh/_docker-compose > ~/.zsh/completion/_docker-compose
fpath=(~/.zsh/completion $fpath)
autoload -Uz compinit && compinit -i
然后在终端我跑
source ~/.zshrc
exec $SHELL -l