mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-12 20:21:02 +01:00
fix(docker-compose): support Compose V2 docker compose
command (#10248)
This commit is contained in:
parent
30d441713c
commit
c396efbee3
1 changed files with 20 additions and 26 deletions
|
@ -1,28 +1,22 @@
|
||||||
# Authors:
|
# support Compose v2 as docker CLI plugin
|
||||||
# https://github.com/tristola
|
command docker compose &>/dev/null && dccmd='docker compose' || dccmd='docker-compose'
|
||||||
#
|
|
||||||
# Docker-compose related zsh aliases
|
|
||||||
|
|
||||||
# Aliases ###################################################################
|
alias dco="$dccmd"
|
||||||
|
alias dcb="$dccmd build"
|
||||||
|
alias dce="$dccmd exec"
|
||||||
|
alias dcps="$dccmd ps"
|
||||||
|
alias dcrestart="$dccmd restart"
|
||||||
|
alias dcrm="$dccmd rm"
|
||||||
|
alias dcr="$dccmd run"
|
||||||
|
alias dcstop="$dccmd stop"
|
||||||
|
alias dcup="$dccmd up"
|
||||||
|
alias dcupb="$dccmd up --build"
|
||||||
|
alias dcupd="$dccmd up -d"
|
||||||
|
alias dcdn="$dccmd down"
|
||||||
|
alias dcl="$dccmd logs"
|
||||||
|
alias dclf="$dccmd logs -f"
|
||||||
|
alias dcpull="$dccmd pull"
|
||||||
|
alias dcstart="$dccmd start"
|
||||||
|
alias dck="$dccmd kill"
|
||||||
|
|
||||||
# Use dco as alias for docker-compose, since dc on *nix is 'dc - an arbitrary precision calculator'
|
unset dccmd
|
||||||
# https://www.gnu.org/software/bc/manual/dc-1.05/html_mono/dc.html
|
|
||||||
|
|
||||||
alias dco='docker-compose'
|
|
||||||
|
|
||||||
alias dcb='docker-compose build'
|
|
||||||
alias dce='docker-compose exec'
|
|
||||||
alias dcps='docker-compose ps'
|
|
||||||
alias dcrestart='docker-compose restart'
|
|
||||||
alias dcrm='docker-compose rm'
|
|
||||||
alias dcr='docker-compose run'
|
|
||||||
alias dcstop='docker-compose stop'
|
|
||||||
alias dcup='docker-compose up'
|
|
||||||
alias dcupb='docker-compose up --build'
|
|
||||||
alias dcupd='docker-compose up -d'
|
|
||||||
alias dcdn='docker-compose down'
|
|
||||||
alias dcl='docker-compose logs'
|
|
||||||
alias dclf='docker-compose logs -f'
|
|
||||||
alias dcpull='docker-compose pull'
|
|
||||||
alias dcstart='docker-compose start'
|
|
||||||
alias dck='docker-compose kill'
|
|
||||||
|
|
Loading…
Reference in a new issue