Add docker-compose TOML function
This commit is contained in:
parent
d468473419
commit
37529aa38a
2 changed files with 20 additions and 1 deletions
2
dotdrop
2
dotdrop
|
@ -1 +1 @@
|
||||||
Subproject commit b1b4839ef391c1503bcaef03d89161348d074ac6
|
Subproject commit 8c97593c45fc86ad7791707a3c8fab137180d4fa
|
|
@ -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 - $@
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue