[misc] fish completion is in official package

This commit is contained in:
Klesh Wong 2020-11-09 17:56:32 +08:00
parent 0c4e214a68
commit b8d7f3f762

View File

@ -21,21 +21,12 @@ esac
sudo systemctl enable docker sudo systemctl enable docker
sudo systemctl start docker sudo systemctl start docker
# configuration # configuration
sudo usermod -aG docker "$USER" sudo usermod -aG docker "$USER"
# completion # set mirror for GREAT CHINA
case "$DEFAULT_SHELL" in if in_china; then
$FISH) sudo mkdir -p /etc/docker
curl -sLo "$HOME/.config/fish/completions/docker.fish" --create-dirs \
'https://github.com/docker/cli/raw/master/contrib/completion/fish/docker.fish'
;;
esac
# set mirror
if in_china && [ -d /etc/docker ]; then
if [ -f /etc/docker/daemon.json ]; then if [ -f /etc/docker/daemon.json ]; then
# backup # backup
[ ! -f /etc/docker/daemon.bak.json ] && \ [ ! -f /etc/docker/daemon.bak.json ] && \