This repository has been archived on 2024-05-12. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
podman-compose/podman-compose-toml.zsh
2023-04-08 16:32:14 +03:00

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 - $@
}