Add docker-compose TOML function

This commit is contained in:
Marko Korhonen 2022-02-26 13:18:03 +02:00
parent d468473419
commit 37529aa38a
2 changed files with 20 additions and 1 deletions

@ -1 +1 @@
Subproject commit b1b4839ef391c1503bcaef03d89161348d074ac6
Subproject commit 8c97593c45fc86ad7791707a3c8fab137180d4fa

View file

@ -238,3 +238,22 @@ btw, () {
▟███▀▘ ▝▀███▙
▟▛▀ ▀▜▙"
}
# docker-compose with TOML
dct() {
local file_path=('./docker-compose.toml')
zmodload zsh/zutil
zparseopts -D -K -- \
f:=file_path ||
return 1
file_path=${file_path[-1]}
if [[ ! -a "$file_path" ]]; then
echo "File $file_path does not exist!"
return 1
fi
yj -ty < $file_path | docker-compose -f - $@
}