#compdef tv

autoload -U is-at-least

_tv() {
    typeset -a _arguments_options

    if is-at-least 5.2; then
        _arguments_options=(-s -S -C)
    else
        _arguments_options=(-s -C)
    fi

    _arguments "${_arguments_options[@]}" \
			'-a+[Table alignment]' \
			'--align=[Table alignment]: :(left center right)' \
			'--style=[Specify the border style]: :(ascii sharp rounded larkdown)' \
			'-s+[Options for sorting by key]' \
			'--sort=[Options for sorting by key]' \
			'-r[Recursive display]' \
			'--recursive[Recursive display]' \
			'--no-headers[Specify that the input has no header row]' \
			'-h[Prints help information]' \
			'--help[Prints help information]' \
			'-V[Prints version information]' \
			'--version[Prints version information]' \
			'::FILE -- json file path:_files' \
}

compdef _tv tv
