mkdir -p ~/.zsh/completions
wget -q https://raw.githubusercontent.com/saltstack/salt/master/pkg/salt.zsh -O ~/.zsh/completions/_salt
sed -i'' -e 's/python2/python/' ~/.zsh/completions/_salt
# ~/.zshrc
fpath=(~/.zsh/completions $fpath)
plugins=(zsh-completions)
autoload -U compinit && compinit
zstyle ':completion:*:salt(|-cp|-call|-run|-key):*' use-cache true
apt install bash-completion
ln -s /usr/share/bash-completion/completions/salt-common /etc/bash_completion.d/salt
source /etc/bash_completion
See https://twitter.com/SaltTips/status/1480793784900370432 for more details