ZSH: Sort results by path in dc function

This commit is contained in:
Christian Baer 2024-10-28 22:27:06 +01:00
parent 5310a56996
commit a768bf308f

View File

@ -4,7 +4,7 @@ function dc() {
# Save current working directory
CURRENT_DIR="${PWD}"
for file in $(find ${PWD} -maxdepth 2 -type f -regextype posix-extended -regex '.*(docker-compose|compose)\.ya?ml'); do
for file in $(find ${PWD} -maxdepth 2 -type f -regextype posix-extended -regex '.*(docker-compose|compose)\.ya?ml' | sort); do
cd $(dirname "$file")
docker compose $@
done