Avoid subshell in test, add comments

This commit is contained in:
Marc Cornellà 2024-07-15 18:33:23 +02:00
commit 8fbffdd51b
No known key found for this signature in database
GPG key ID: 0314585E776A9C1B

View file

@ -1,5 +1,8 @@
# support Compose v2 as docker CLI plugin
[[ -x "$(command -v docker-compose)" ]] && dccmd='docker-compose' || dccmd='docker compose'
# Support Compose v2 as docker CLI plugin
#
# This tests that the (old) docker-compose command is in $PATH and that
# it resolves to an existing executable file if it's a symlink.
[[ -x "${commands[docker-compose]:A}" ]] && dccmd='docker-compose' || dccmd='docker compose'
alias dco="$dccmd"
alias dcb="$dccmd build"