Add docker-compose TOML function
This commit is contained in:
parent
e93b6a99fd
commit
8aaa911e19
2 changed files with 20 additions and 1 deletions
|
@ -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