#compdef play.it

# Copyright © 2025 Christopher Bock <christopher@bocki.com>
# SPDX-License-Identifier: BSD 2-Clause "Simplified" License

local -a arguments

arguments=(
	'--collection-path[Limit the search for game scripts to path]: :_files -/'
	- set1
	'--checksum[archive integrity verification method]: :_values "checksum" md5 none'
	'--compression[packages compression method]: :_values "compression" auto size speed none'
	'--config-file[set configuration]: :_files'
	'--no-free-space-check[do not check for free space]'
	'--no-icons[do not include game icons]'
	'--no-mtree[do not create .mtree in arch packages]'
	'--output-dir[directory for generated packages]: :_files -/'
	'--overwrite[replace package if present]'
	'--package[package type]: :_values "package type" arch deb gentoo'
	'--prefix[game installation path]: :_files -/'
	'--tmpdir[temporary directory]: :_path_files -/'
	- set2
	'(: -)--show-game-script[show script name for given archive]: :_files'
	'(: -)--list-packages[print list of required command to build package for archive]: :_files'
	'(: -)--list-requirements[print the list of commands required to build packages from the given archive]: :_files'
	'(: -)--list-available-scripts[print the list of game scripts available on this system]'
	'(: -)--list-supported-games[print the list of supported games]'
	'(: -)--help[show help]'
	'(: -)--version[show version]'
)

_arguments -A "--*" "${arguments[@]}" '*: :_files'
