16 lines
454 B
Bash
16 lines
454 B
Bash
# source this file in ZSH to get TOML support in podman-compose
|
|
# via the dct command
|
|
# yj is required for this to work.
|
|
# function name stands for Podman Compose Toml
|
|
pct () {
|
|
local file_path=('./podman-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 - $@
|
|
}
|